Platforms to show: All Mac Windows Linux Cross-Platform
CGPDFContextMBS class
Super class: CGContextMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
class | CoreGraphics | MBS MacCG Plugin | 12.0 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
This class defines functions to create and get information about a Quartz PDF context. A CGPDFContext object is a type of CGContext that is used for drawing PDF content. The functions in this reference operate only on Quartz PDF graphics contexts created using the functions CGPDFContextCreate or CGPDFContextCreateWithURL.
When you draw to the PDF context using CGContext functions the drawing operations are recorded in PDF format. The PDF commands that represent the drawing are written to the destination specified when you create the PDF graphics context.
Subclass of the CGContextMBS class.
- 6 methods
- method AddDestinationAtPoint(name as string, x as Double, y as Double)
- method BeginPage(pageInfo as dictionary)
- method Close
- method EndPage
- method SetDestinationForRect(name as string, x as Double, y as Double, w as Double, h as Double)
- method SetURLForRect(url as string, x as Double, y as Double, w as Double, h as Double)
- 23 shared methods
- shared method kCGPDFContextAllowsCopying as string
- shared method kCGPDFContextAllowsPrinting as string
- shared method kCGPDFContextArtBox as string
- shared method kCGPDFContextAuthor as string
- shared method kCGPDFContextBleedBox as string
- shared method kCGPDFContextCreator as string
- shared method kCGPDFContextCropBox as string
- shared method kCGPDFContextEncryptionKeyLength as string
- shared method kCGPDFContextKeywords as string
- shared method kCGPDFContextMediaBox as string
- shared method kCGPDFContextOutputIntent as string
- shared method kCGPDFContextOutputIntents as string
- shared method kCGPDFContextOwnerPassword as string
- shared method kCGPDFContextSubject as string
- shared method kCGPDFContextTitle as string
- shared method kCGPDFContextTrimBox as string
- shared method kCGPDFContextUserPassword as string
- shared method kCGPDFXDestinationOutputProfile as string
- shared method kCGPDFXInfo as string
- shared method kCGPDFXOutputCondition as string
- shared method kCGPDFXOutputConditionIdentifier as string
- shared method kCGPDFXOutputIntentSubtype as string
- shared method kCGPDFXRegistryName as string
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:
- CGNewPDFDocumentMBS(consumer as CGDataConsumerMBS, MediaBox as CGRectMBS, title as string, author as string, creator as string) as CGPDFContextMBS
- CGNewPDFDocumentMBS(file as folderitem, MediaBox as CGRectMBS, title as string, author as string, creator as string) as CGPDFContextMBS
- CGNewPDFDocumentMBS(file as folderitem, MediaBox as CGRectMBS, title as string, author as string, creator as string, subject as string, keywords as string, OwnerPassword as string, UserPassword as string, AllowsPrinting as boolean, AllowsCopy as boolean) as CGPDFContextMBS
- CGNewPDFDocumentMBS(file as folderitem, MediaBox as CGRectMBS, title as string, author as string, creator as string, subject as string, keywords as string, OwnerPassword as string, UserPassword as string, AllowsPrinting as boolean, AllowsCopy as boolean, KeyLength as Integer) as CGPDFContextMBS
Some methods using this class:
- FolderItem.NewCGPDFDocumentMBS(MediaBox as CGRectMBS, title as string, author as string, creator as string) as CGPDFContextMBS
- FolderItem.NewCGPDFDocumentMBS(MediaBox as CGRectMBS, title as string, author as string, creator as string, subject as string, keywords as string, OwnerPassword as string, UserPassword as string, AllowsPrinting as boolean, AllowsCopy as boolean) as CGPDFContextMBS
- FolderItem.NewCGPDFDocumentMBS(MediaBox as CGRectMBS, title as string, author as string, creator as string, subject as string, keywords as string, OwnerPassword as string, UserPassword as string, AllowsPrinting as boolean, AllowsCopy as boolean, KeyLength as Integer) as CGPDFContextMBS
- FolderItem.NewCGPDFDocumentWithInfoMBS(MediaBox as CGRectMBS, info as object) as CGPDFContextMBS
Blog Entries
Release notes
- Version 19.1
- Fixed constants in CGPDFContextMBS class.
The items on this page are in the following plugins: MBS MacCG Plugin.
CGPDFArrayMBS - CGPDFDictionaryListMBS