public UGSolidColorBrush(IUGContext context, UGColor color) => _native = new SolidBrush(color.ToGDIColor());
public UGRadialGradientBrush(IUGContext context, UGColor startColor, UGColor endColor) : this(context, startColor, endColor, UGEdgeBehavior.Clamp) { }
public override void InitializeResources(IUGContext context) { _linear0 = new UGLinearGradientBrush( context, new Vector2(0F, 0F), new Vector2(1F, 0F), new[] { new UGGradientStop(UGColor.FromHSL(0F / 3F, 1F, .5F), .25F), new UGGradientStop(UGColor.FromHSL(2F / 3F, 1F, .5F), .75F), }, UGEdgeBehavior.Clamp); _linear45 = new UGLinearGradientBrush( context, new Vector2(0F, 0F), new Vector2(1F, 1F), new[] { new UGGradientStop(UGColor.FromHSL(0F / 3F, 1F, .5F), .25F), new UGGradientStop(UGColor.FromHSL(2F / 3F, 1F, .5F), .75F), }, UGEdgeBehavior.Clamp); _linear90 = new UGLinearGradientBrush( context, new Vector2(0F, 0F), new Vector2(0F, 1F), new[] { new UGGradientStop(UGColor.FromHSL(0F / 3F, 1F, .5F), .25F), new UGGradientStop(UGColor.FromHSL(2F / 3F, 1F, .5F), .75F), }, UGEdgeBehavior.Clamp); _radialClamp = new UGRadialGradientBrush( context, new[] { new UGGradientStop(UGColor.FromHSL(0F / 3F, 1F, .5F), 0F), new UGGradientStop(UGColor.FromHSL(1F / 3F, 1F, .5F), .5F), new UGGradientStop(UGColor.FromHSL(2F / 3F, 1F, .5F), 1F), }, UGEdgeBehavior.Clamp); _radialWrap = new UGRadialGradientBrush( context, new[] { new UGGradientStop(UGColor.FromHSL(0F / 3F, 1F, .5F), 0F), new UGGradientStop(UGColor.FromHSL(1F / 3F, 1F, .5F), .5F), new UGGradientStop(UGColor.FromHSL(2F / 3F, 1F, .5F), 1F), }, UGEdgeBehavior.Wrap); _radialMirror = new UGRadialGradientBrush( context, new[] { new UGGradientStop(UGColor.FromHSL(0F / 3F, 1F, .5F), 0F), new UGGradientStop(UGColor.FromHSL(1F / 3F, 1F, .5F), .5F), new UGGradientStop(UGColor.FromHSL(2F / 3F, 1F, .5F), 1F), }, UGEdgeBehavior.Mirror); _radialClamp2 = new UGRadialGradientBrush( context, new Vector2(.2F, .2F), .75F, new[] { new UGGradientStop(UGColor.FromHSL(0F / 3F, 1F, .5F), 0F), new UGGradientStop(UGColor.FromHSL(.5F / 3F, 1F, .5F), .25F), new UGGradientStop(UGColor.FromHSL(1F / 3F, 1F, .5F), .5F), new UGGradientStop(UGColor.FromHSL(1.5F / 3F, 1F, .5F), .75F), new UGGradientStop(UGColor.FromHSL(2F / 3F, 1F, .5F), 1F), }, UGEdgeBehavior.Clamp); _radialWrap2 = new UGRadialGradientBrush( context, new Vector2(.2F, .2F), .75F, new[] { new UGGradientStop(UGColor.FromHSL(0F / 3F, 1F, .5F), 0F), new UGGradientStop(UGColor.FromHSL(.5F / 3F, 1F, .5F), .25F), new UGGradientStop(UGColor.FromHSL(1F / 3F, 1F, .5F), .5F), new UGGradientStop(UGColor.FromHSL(1.5F / 3F, 1F, .5F), .75F), new UGGradientStop(UGColor.FromHSL(2F / 3F, 1F, .5F), 1F), }, UGEdgeBehavior.Wrap); _radialMirror2 = new UGRadialGradientBrush( context, new Vector2(.2F, .2F), .75F, new[] { new UGGradientStop(UGColor.FromHSL(0F / 3F, 1F, .5F), 0F), new UGGradientStop(UGColor.FromHSL(.5F / 3F, 1F, .5F), .25F), new UGGradientStop(UGColor.FromHSL(1F / 3F, 1F, .5F), .5F), new UGGradientStop(UGColor.FromHSL(1.5F / 3F, 1F, .5F), .75F), new UGGradientStop(UGColor.FromHSL(2F / 3F, 1F, .5F), 1F), }, UGEdgeBehavior.Mirror); }
public UGSolidColorBrush(IUGContext context, UGColor color) { _native = color.ToCGColor(); }
public UGSolidColorBrush(IUGContext context, UGColor color) => _native = new CanvasSolidColorBrush(((UGContext)context).Device, color.ToWinRTColor());
public UGTextLayout(IUGContext context, string textString, IUGTextFormat textFormat, UGSize requestedSize) { _native = new NSString(textString); _textFormat = (UGTextFormat)textFormat; _requestedSize = requestedSize; }
public UGLinearGradientBrush(IUGContext context, Vector2 startPoint, Vector2 endPoint, UGColor startColor, UGColor endColor, UGEdgeBehavior edgeBehavior) : this(context, startPoint, endPoint, new[] { new UGGradientStop(startColor, 0F), new UGGradientStop(endColor, 1F) }, edgeBehavior) { }
public UGRadialGradientBrush(IUGContext context, IEnumerable <UGGradientStop> gradientStops, UGEdgeBehavior edgeBehavior) : this(context, new Vector2(.5F, .5F), .5F, gradientStops, edgeBehavior) { }
public UGPath(IUGContext context) { }
public UGLinearGradientBrush(IUGContext context, UGColor startColor, UGColor endColor, float angle, UGEdgeBehavior edgeBehavior) : this(context, Vector2.Zero, UGLinearGradientHelper.EndPointFromAngle(angle), startColor, endColor, edgeBehavior) { }
protected virtual void DrawOverride(IUGContext context) { }
protected override void DrawOverride(IUGContext context) { Delegate?.OnDraw(context); }
public UGPath(IUGContext context) { _context = (UGContext)context; }
public UGRadialGradientBrush(IUGContext context, UGColor startColor, UGColor endColor, UGEdgeBehavior edgeBehavior) : this(context, new Vector2(.5F, .5F), .5F, new[] { new UGGradientStop(startColor, 0F), new UGGradientStop(endColor, 1F) }, edgeBehavior) { }
public UGLinearGradientBrush(IUGContext context, Vector2 startPoint, Vector2 endPoint, IEnumerable <UGGradientStop> gradientStops) : this(context, startPoint, endPoint, gradientStops, UGEdgeBehavior.Clamp) { }
public UGRadialGradientBrush(IUGContext context, IEnumerable <UGGradientStop> gradientStops) : this(context, gradientStops, UGEdgeBehavior.Clamp) { }
public UGTextLayout(IUGContext context, string textString, IUGTextFormat textFormat) : this(context, textString, textFormat, UGSize.MaxValue) { }
public UGRadialGradientBrush(IUGContext context, Vector2 center, float radius, IEnumerable <UGGradientStop> gradientStops) : this(context, center, radius, gradientStops, UGEdgeBehavior.Clamp) { }
public UGPath(IUGContext context) => _native = new Path();