mirror of
https://gitee.com/csharpui/CPF.git
synced 2026-08-28 03:27:04 +08:00
初始化
This commit is contained in:
90
CPF.Mac/Mac/CoreText/CTFontVariationAxes.cs
Normal file
90
CPF.Mac/Mac/CoreText/CTFontVariationAxes.cs
Normal file
@@ -0,0 +1,90 @@
|
||||
using CPF.Mac.Foundation;
|
||||
using CPF.Mac.ObjCRuntime;
|
||||
using System;
|
||||
|
||||
namespace CPF.Mac.CoreText
|
||||
{
|
||||
[Since(3, 2)]
|
||||
public class CTFontVariationAxes
|
||||
{
|
||||
public NSDictionary Dictionary
|
||||
{
|
||||
get;
|
||||
private set;
|
||||
}
|
||||
|
||||
public NSNumber Identifier
|
||||
{
|
||||
get
|
||||
{
|
||||
return (NSNumber)Dictionary[CTFontVariationAxisKey.Identifier];
|
||||
}
|
||||
set
|
||||
{
|
||||
Adapter.SetValue(Dictionary, CTFontVariationAxisKey.Identifier, value);
|
||||
}
|
||||
}
|
||||
|
||||
public NSNumber MinimumValue
|
||||
{
|
||||
get
|
||||
{
|
||||
return (NSNumber)Dictionary[CTFontVariationAxisKey.MinimumValue];
|
||||
}
|
||||
set
|
||||
{
|
||||
Adapter.SetValue(Dictionary, CTFontVariationAxisKey.MinimumValue, value);
|
||||
}
|
||||
}
|
||||
|
||||
public NSNumber MaximumValue
|
||||
{
|
||||
get
|
||||
{
|
||||
return (NSNumber)Dictionary[CTFontVariationAxisKey.MaximumValue];
|
||||
}
|
||||
set
|
||||
{
|
||||
Adapter.SetValue(Dictionary, CTFontVariationAxisKey.MaximumValue, value);
|
||||
}
|
||||
}
|
||||
|
||||
public NSNumber DefaultValue
|
||||
{
|
||||
get
|
||||
{
|
||||
return (NSNumber)Dictionary[CTFontVariationAxisKey.DefaultValue];
|
||||
}
|
||||
set
|
||||
{
|
||||
Adapter.SetValue(Dictionary, CTFontVariationAxisKey.DefaultValue, value);
|
||||
}
|
||||
}
|
||||
|
||||
public string Name
|
||||
{
|
||||
get
|
||||
{
|
||||
return Adapter.GetStringValue(Dictionary, CTFontVariationAxisKey.Name);
|
||||
}
|
||||
set
|
||||
{
|
||||
Adapter.SetValue(Dictionary, CTFontVariationAxisKey.Name, value);
|
||||
}
|
||||
}
|
||||
|
||||
public CTFontVariationAxes()
|
||||
: this(new NSMutableDictionary())
|
||||
{
|
||||
}
|
||||
|
||||
public CTFontVariationAxes(NSDictionary dictionary)
|
||||
{
|
||||
if (dictionary == null)
|
||||
{
|
||||
throw new ArgumentNullException("dictionary");
|
||||
}
|
||||
Dictionary = dictionary;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user