Platforms to show: All Mac Windows Linux Cross-Platform

CGMutablePathMBS class

Superclass: CGPathMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
class CoreGraphics MBS MacCG Plugin 8.0 ✅ Yes ❌ No ❌ No ✅ Yes All
A class for a CoreGraphics mutable path.
Example
// build a path with a triangle and a circle and fill it into a picture
Var path As New CGMutablePathMBS
path.MoveToPoint(Nil, 20, 20)
path.AddLineToPoint(Nil, 180, 20)
path.AddLineToPoint(Nil, 100, 160)
path.CloseSubpath
path.AddEllipseInRect(Nil, CGRectMBS.Make(200, 40, 80, 80))

Var pic As New Picture(300, 200)
Var ctx As CGBitmapContextMBS = CGBitmapContextMBS.CreateWithPicture(pic)
ctx.SetRGBFillColor(0.2, 0.4, 0.8)
ctx.AddPath path
ctx.FillPath

Var result As Picture = ctx.CreateImage.Picture
// show result in a Canvas or ImageViewer

Subclass of the CGPathMBS class.

Superclass CGPathMBS

This class has no subclasses.

Some methods using this class:

Some examples using this class:

Some related classes:


The items on this page are in the following plugins: MBS MacCG Plugin.


CGMutableImageMetadataMBS   -   CGPathElementMBS


The biggest plugin in space...