CGPDFContextMBS class
Online Documentation - Statistics - FAQ - Plugin Parts (All , Dependencies ) - Class hierarchy
New in Version
22.2
22.3
22.4
22.5
23.0
23.1
23.2
23.3
23.4
23.5
24.0
24.1
The list of the topics ,
classes ,
interfaces ,
controls ,
modules ,
global methods by category ,
global methods by name ,
screenshots ,
licenses
and examples .
Platforms to show: All Mac Windows Linux Cross-Platform
CGPDFContextMBS class
Super class: CGContextMBS
A CoreGraphics context for PDF specific functions.
Example
// create pdf dim file as FolderItem = SpecialFolder.Desktop.Child("test.pdf" )dim r as new CGRectMBS (0 ,0 ,500 ,500 )dim c as CGContextMBS = file.NewCGPDFDocumentMBS (r, "My Title" , "My Author" , "My Creator" )if c<>Nil then // create page c.BeginPage r // draw something c.SetRGBFillColor(1.0 , 0.0 , 0.0 , 1.0 ) c.FillRect CGMakeRectMBS (100 ,100 ,100 ,100 ) // close page c.EndPage // flush and show in PDF viewer c = nil file.Launchend if
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
5 properties
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
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
The items on this page are in the following plugins: MBS MacCG Plugin .
CGPDFArrayMBS
-
CGPDFDictionaryListMBS