本文整理汇总了C#中MonoMac.CoreGraphics.CGContext.FillPath方法的典型用法代码示例。如果您正苦于以下问题:C# CGContext.FillPath方法的具体用法?C# CGContext.FillPath怎么用?C# CGContext.FillPath使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MonoMac.CoreGraphics.CGContext
的用法示例。
在下文中一共展示了CGContext.FillPath方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: DrawInContext
public override void DrawInContext (CGContext context)
{
base.DrawInContext (context);
context.AddEllipseInRect (Bounds);
context.SetFillColor (ClockColor);
context.FillPath ();
}
示例2: FillEllipsis
public static void FillEllipsis(CGContext context, RectangleF rect, CGColor color, float lineWidth)
{
context.SaveState();
context.SetFillColor(color);
context.AddEllipseInRect(rect);
context.FillPath();
context.RestoreState();
}
示例3: FillPath
public static void FillPath(CGContext context, CGPath path, CGColor color)
{
context.SaveState();
context.SetFillColor(color);
context.AddPath(path);
context.FillPath();
context.RestoreState();
}
示例4: drawBackground
void drawBackground(CGContext context, Color color, float width, float height)
{
context.SetFillColor(color.ToCGColor());
context.FillRect(new RectangleF(HALF_PIXEL_X, HALF_PIXEL_Y, width+HALF_PIXEL_X, height+HALF_PIXEL_Y));
context.FillPath();
}
示例5: HatchSolidDiamond
void HatchSolidDiamond(CGContext context)
{
var hatchWidth = getHatchWidth (hatchStyle);
var hatchHeight = getHatchHeight (hatchStyle);
var lineWidth = getLineWidth (hatchStyle);
initializeContext(context, hatchHeight, false);
/* draw background */
drawBackground (context, backColor, hatchWidth, hatchHeight);
/* draw lines in the foreground color */
context.SetFillColor(foreColor.ToCGColor());
context.SetStrokeColor(foreColor.ToCGColor());
context.SetLineWidth(lineWidth);
context.SetLineCap(CGLineCap.Square);
float halfMe = hatchWidth / 2.0f;
// We will paint two triangles from corners meeting in the middle
// make sure to offset by half pixels so that the point is actually a point.
context.MoveTo(-HALF_PIXEL_X,HALF_PIXEL_Y);
context.AddLineToPoint(2+HALF_PIXEL_X, halfMe - HALF_PIXEL_Y);
context.AddLineToPoint(-HALF_PIXEL_X, hatchHeight- (1.0f + HALF_PIXEL_Y));
context.ClosePath();
context.FillPath();
// now we do the right one
context.MoveTo(hatchWidth,HALF_PIXEL_Y);
context.AddLineToPoint(halfMe+HALF_PIXEL_X, halfMe - HALF_PIXEL_Y);
context.AddLineToPoint(hatchWidth, hatchHeight - (1.0f + HALF_PIXEL_Y));
context.ClosePath();
context.FillPath();
}