Platforms to show: All Mac Windows Linux Cross-Platform
CGBitmapContextMBS class
Super class: CGContextMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
class | CoreGraphics | MBS MacCG Plugin | 3.4 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
If the RB graphics class is like a CGContext, the RB picture class (created using NewPicture) is something like a CGBitmapContext.
Subclass of the CGContextMBS class.
This is an abstract class. You can't create an instance, but you can get one from various plugin functions.
- 9 properties
- property BitmapAlphaInfo as Integer
- property BitmapBitsPerComponent as Integer
- property BitmapBitsPerPixel as Integer
- property BitmapBytesPerRow as Integer
- property BitmapColorSpace as CGColorSpaceMBS
- property BitmapData as MemoryBlock
- property BitmapHeight as Integer
- property BitmapInfo as Integer
- property BitmapWidth as Integer
- 3 methods
- method CGImage(shouldInterpolate as boolean = false, intent as Integer = 0) as CGImageMBS
- method Constructor Private
- method CreateImage as CGImageMBS
- 4 shared methods
- shared method Create(data as memoryblock, width as Integer, height as Integer, bitsPerComponent as Integer, bytesPerRow as Integer, colorspace as CGColorSpaceMBS, alphaInfo as Integer) as CGBitmapContextMBS
- shared method Create(Other as CGBitmapContextMBS, NewColorspace as CGColorSpaceMBS) as CGBitmapContextMBS
- shared method CreateRGB(data as memoryblock, width as Integer, height as Integer, bytesPerRow as Integer, colorspace as CGColorSpaceMBS = nil) as CGBitmapContextMBS
- shared method CreateWithPicture(Pic as Picture) as CGBitmapContextMBS
Super class CGContextMBS
- 5 properties
- property handle as Integer
- property InterpolationQuality as Integer
- property RetainCount as Integer
- property TextMatrix as CGAffineTransformMBS
- property TextPosition as CGPointMBS
- 103 methods
- method AddArc(x as Double, y as Double, radius as Double, startangle as Double, endangle as Double, clockwise as boolean)
- method addArcToPath(x as Double, y as Double, w as Double, h as Double, startAngle as Integer, arcAngle as Integer)
- method AddArcToPoint(x1 as Double, y1 as Double, x2 as Double, y2 as Double, radius as Double)
- method AddCurveToPoint(cp1x as Double, cp1y as Double, cp2x as Double, cp2y as Double, x as Double, y as Double)
- method AddEllipseInRect(r as CGRectMBS)
- method AddLines(p() as CGPointMBS)
- method AddLineToPoint(x as Double, y as Double)
- method addOvalToPath(x as Double, y as Double, w as Double, h as Double)
- method AddPath(path as CGPathMBS)
- method AddQuadCurveToPoint(cpx as Double, cpy as Double, x as Double, y as Double)
- method AddRect(r as CGRectMBS)
- method AddRects(r() as CGRectMBS)
- method addRoundedRectToPath(x as Double, y as Double, w as Double, h as Double, arcWidth as Double, arcHeight as Double)
- method BeginPage(mediabox as CGRectMBS)
- method BeginPath
- method BeginTransparencyLayer(auxiliaryInfo as Dictionary = nil)
- method BeginTransparencyLayerWithRect(r as CGRectMBS, auxiliaryInfo as Dictionary = nil)
- method clearRect(rect as CGRectMBS)
- method clip
- method ClipToMask(rect as CGRectMBS, mask as CGImageMBS)
- method clipToRect(rect as CGRectMBS)
- method Close
- method closePath
- method ConcatCTM(transform as CGAffineTransformMBS)
- method Constructor(g as graphics)
- method Constructor(handle as Integer)
- method Constructor(pic as Picture)
- method CopyPath as CGPathMBS
- method DrawCGPDFDocument(pdf as Variant, rect as CGRectMBS, page as Integer)
- method DrawLayerAtPoint(Point as CGPointMBS, layer as CGLayerMBS)
- method DrawLayerInRect(rect as CGRectMBS, layer as CGLayerMBS)
- method DrawLinearGradient(gradient as CGGradientMBS, startPoint as CGPointMBS, endPoint as CGPointMBS, options as Integer)
- method DrawPath(mode as Integer)
- method DrawPicture(pic as CGImageMBS, rect as CGRectMBS)
- method DrawRadialGradient(gradient as CGGradientMBS, startCenter as CGPointMBS, startRadius as Double, endCenter as CGPointMBS, endRadius as Double, options as Integer)
- method DrawShading(shading as CGShadingMBS)
- method DrawTiledImage(pic as CGImageMBS, rect as CGRectMBS)
- method EndPage
- method EndTransparencyLayer
- method EOClip
- method EOFillPath
- method FillEllipseInRect(rect as CGRectMBS)
- method FillPath
- method FillRect(rect as CGRectMBS)
- method fillRoundedRect(x as Double, y as Double, w as Double, h as Double, arcWidth as Double, arcHeight as Double)
- method Flush
- method frameArc(x as Double, y as Double, w as Double, h as Double, startAngle as Integer, arcAngle as Integer)
- method frameOval(x as Double, y as Double, w as Double, h as Double)
- method frameRect(x as Double, y as Double, w as Double, h as Double)
- method GetClipBoundingBox as CGRectMBS
- method GetCTM as CGAffineTransformMBS
- method GetPathBoundingBox as CGRectMBS
- method GetPathCurrentPoint as CGPointMBS
- method GetTextPosition as CGPointMBS
- method IsPathEmpty as boolean
- method MoveToPoint(x as Double, y as Double)
- method paintArc(x as Double, y as Double, w as Double, h as Double, startAngle as Integer, arcAngle as Integer)
- method paintOval(x as Double, y as Double, w as Double, h as Double)
- method paintRect(x as Double, y as Double, w as Double, h as Double)
- method PathContainsPoint(point as CGPointMBS, mode as Integer) as boolean
- method ReplacePathWithStrokedPath
- method RestoreGState
- method RotateCTM(angle as Double)
- method SaveGState
- method ScaleCTM(sx as Double, sy as Double)
- method SelectFont(name as string, size as Double, fontencoding as Integer)
- method SetAllowsAntialiasing(allowsAntialiasing as boolean)
- method SetAlpha(alpha as Double)
- method SetBlendMode(BlendMode as Integer)
- method SetCharacterSpacing(spacing as Double)
- method SetCMYKFillColor(cyan as Double, magenta as Double, yellow as Double, black as Double, alpha as Double = 1.0)
- method SetCMYKStrokeColor(cyan as Double, magenta as Double, yellow as Double, black as Double, alpha as Double = 1.0)
- method SetFillColor(color as CGColorMBS)
- method SetFillColorSpace(colorspace as CGColorSpaceMBS)
- method SetFlatness(flatness as Double)
- method SetFont(font as CGFontMBS)
- method SetFontSize(size as Double)
- method SetGrayFillColor(gray as Double, alpha as Double = 1.0)
- method SetGrayStrokeColor(gray as Double, alpha as Double = 1.0)
- method SetLineCap(cap as Integer)
- method SetLineDash(phase as Double, lengths as memoryblock, count as Integer)
- method SetLineJoin(join as Integer)
- method SetLineWidth(width as Double)
- method SetMiterLimit(limit as Double)
- method SetRenderingIntent(intent as Integer)
- method SetRGBFillColor(red as Double, green as Double, blue as Double, alpha as Double = 1.0)
- method SetRGBStrokeColor(red as Double, green as Double, blue as Double, alpha as Double = 1.0)
- method SetShadow(x as Double, y as Double, blur as Double)
- method SetShadowWithColor(x as Double, y as Double, blur as Double, colorvalue as CGColorMBS)
- method SetShouldAntialias(shouldAntialias as boolean)
- method SetShouldSmoothFonts(shouldSmoothFonts as boolean)
- method SetStrokeColor(color as CGColorMBS)
- method SetStrokeColorSpace(colorspace as CGColorSpaceMBS)
- method SetTextDrawingMode(mode as Integer)
- method ShowText(text as string)
- method ShowTextAtPoint(text as string, x as Double, y as Double)
- method StrokeEllipseInRect(rect as CGRectMBS)
- method StrokePath
- method StrokeRect(rect as CGRectMBS)
- method StrokeRectWithWidth(rect as CGRectMBS, width as Double)
- method strokeRoundedRect(x as Double, y as Double, w as Double, h as Double, arcWidth as Double, arcHeight as Double)
- method Synchronize
- method TranslateCTM(tx as Double, ty as Double)
- 2 shared methods
- shared method contextWithCGContext(handle as Integer) as CGContextMBS
- shared method contextWithCGContext(handle as Ptr) as CGContextMBS
- 54 constants
This class has no sub classes.
Some useful global functions for this class:
- CGBitmapContextCreateMBS(data as memoryblock, width as Integer, height as Integer, bitsPerComponent as Integer, bytesPerRow as Integer, colorspace as CGColorSpaceMBS, alphaInfo as Integer) as CGBitmapContextMBS
Some examples using this class:
- /Images/LCMS2/Drawing on Mac with Colorspaces/Drawing on Mac with Colorspaces
- /MacCG/CGImageSource/CGImageSource Convert
- /MacCG/CoreGraphics Bitmap
- /MacCG/Icon with CGContext
- /MacCG/Mac ColorSpace tests
- /MacCocoa/NSImage/Open Image using NSImage
- /MacFrameworks/LSSharedFileListMBS Test
- /MacOSX/Input Sources
Blog Entries
- Colorspaces in MacOS with Xojo
- MBS Xojo / Real Studio Plugins, version 15.0pr5
- MBS Xojo / Real Studio Plugins, version 14.3pr11
- MBS Real Studio Plugins, version 13.1pr3
- MBS REALbasic Plugins, version 11.2pr1
The items on this page are in the following plugins: MBS MacCG Plugin.
CGAffineTransformMBS - CGColorMBS