• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.9.5/pyobjc-42/2.5/pyobjc/pyobjc-framework-Quartz/Examples/Programming with Quartz/BasicDrawing/

Lines Matching refs:context

8 def doColorSpaceFillAndStroke(context):
14 CGContextSetFillColorSpace(context, theColorSpace)
18 CGContextSetFillColor(context, opaqueRed)
21 CGContextSetStrokeColorSpace(context, theColorSpace)
25 CGContextSetStrokeColor(context, aBlue)
27 CGContextSetLineWidth(context, 8.0)
29 CGContextBeginPath(context)
30 CGContextAddRect(context, CGRectMake(20.0, 20.0, 100.0, 100.0))
31 CGContextDrawPath(context, kCGPathFillStroke)
37 CGContextSetStrokeColor(context, aBlue)
39 CGContextBeginPath(context)
40 CGContextAddRect(context, CGRectMake(140.0, 20.0, 100.0, 100.0))
41 CGContextDrawPath(context, kCGPathFillStroke)
50 def drawWithColorRefs(context):
76 CGContextSetFillColorWithColor(context, _opaqueRedColor)
78 CGContextSetStrokeColorWithColor(context, _opaqueBlueColor)
80 CGContextSetLineWidth(context, 8.0)
82 CGContextBeginPath(context)
83 CGContextAddRect(context, CGRectMake(20.0, 20.0, 100.0, 100.0))
84 CGContextDrawPath(context, kCGPathFillStroke)
88 CGContextSetStrokeColorWithColor(context, _transparentBlueColor)
90 CGContextBeginPath(context)
91 CGContextAddRect(context, CGRectMake(140.0, 20.0, 100.0, 100.0))
92 CGContextDrawPath(context, kCGPathFillStroke)
94 def doIndexedColorDrawGraphics(context):
116 CGContextSetStrokeColorSpace(context, theIndexedSpace)
117 CGContextSetFillColorSpace(context, theIndexedSpace)
120 CGContextSetStrokeColor(context, aBlue)
122 CGContextSetFillColor(context, opaqueRed)
124 CGContextSetLineWidth(context, 8.0)
126 CGContextBeginPath(context)
127 CGContextAddRect(context, CGRectMake(20.0, 20.0, 100.0, 100.0))
128 CGContextDrawPath(context, kCGPathFillStroke)
135 CGContextSetStrokeColor(context, aBlue)
137 CGContextBeginPath(context)
138 CGContextAddRect(context, CGRectMake(140.0, 20.0, 100.0, 100.0))
139 CGContextDrawPath(context, kCGPathFillStroke)
143 def drawWithGlobalAlpha(context):
147 CGContextSetFillColorSpace(context, Utilities.getTheCalibratedRGBColorSpace())
149 CGContextSetFillColor(context, color)
151 CGContextSaveGState(context)
153 CGContextFillRect(context, rect)
155 CGContextTranslateCTM(context, rect.size.width + 70.0, 0.0)
159 CGContextSetFillColor(context, color)
161 CGContextFillRect(context, rect)
163 CGContextTranslateCTM(context, rect.size.width + 70.0, 0.0)
167 CGContextSetFillColor(context, color)
169 CGContextFillRect(context, rect)
170 CGContextRestoreGState(context)
175 # Now set the context global alpha value to 50% opaque.
176 CGContextSetAlpha(context, 0.5)
178 CGContextTranslateCTM(context, 0.0, -(rect.size.height + 70.0))
182 def drawWithColorBlendMode(context, url):
198 CGContextTranslateCTM(context, 20, 10 + CGRectGetHeight(pdfRect)/2)
201 CGContextDrawPDFDocument(context, pdfRect, pdfDoc, 1)
204 CGContextSetFillColorSpace(context, Utilities.getTheCalibratedRGBColorSpace())
206 CGContextSetFillColor(context, green)
209 CGContextTranslateCTM(context, CGRectGetWidth(pdfRect) + 10,
213 CGContextDrawPDFDocument(context, pdfRect, pdfDoc, 1)
220 CGContextFillRect(context, insetRect)
223 CGContextTranslateCTM(context, 0, -(10 + CGRectGetHeight(pdfRect)))
226 CGContextDrawPDFDocument(context, pdfRect, pdfDoc, 1)
230 CGContextSetBlendMode(context, kCGBlendModeColor)
234 CGContextFillRect(context, insetRect)
237 def createEllipsePath(context, center, ellipseSize):
238 CGContextSaveGState(context)
240 CGContextTranslateCTM(context, center.x, center.y)
243 CGContextScaleCTM(context, ellipseSize.width/2, ellipseSize.height/2)
244 CGContextBeginPath(context)
249 CGContextAddArc(context, 0.0, 0.0, 1.0, 0.0, Utilities.DEGREES_TO_RADIANS(360.0), 0.0)
252 CGContextClosePath(context)
253 CGContextRestoreGState(context)
257 def doClippedEllipse(context):
279 CGContextSaveGState(context)
281 createEllipsePath(context, theCenterPoint, theEllipseSize)
282 CGContextSetFillColorWithColor(context, _opaqueBrownColor)
283 CGContextFillPath(context)
285 CGContextTranslateCTM(context, theCenterPoint.x, theCenterPoint.y)
287 CGContextRotateCTM(context, Utilities.DEGREES_TO_RADIANS(45))
291 createEllipsePath(context, CGPointZero, theEllipseSize)
292 CGContextSetFillColorWithColor(context, _opaqueOrangeColor)
293 CGContextFillPath(context)
294 CGContextRestoreGState(context)
296 CGContextTranslateCTM(context, 170.0, 0.0)
299 CGContextSaveGState(context)
301 createEllipsePath(context, theCenterPoint, theEllipseSize)
302 CGContextSetStrokeColorWithColor(context, _opaqueBrownColor)
303 CGContextSetLineDash(context, 0, dash, 1)
305 CGContextStrokePath(context)
307 createEllipsePath(context, theCenterPoint, theEllipseSize)
309 CGContextClip(context)
310 CGContextTranslateCTM(context, theCenterPoint.x, theCenterPoint.y)
312 CGContextRotateCTM(context, Utilities.DEGREES_TO_RADIANS(45))
314 createEllipsePath(context, CGPointZero, theEllipseSize)
315 CGContextSetFillColorWithColor(context, _opaqueOrangeColor)
316 CGContextFillPath(context)
317 CGContextRestoreGState(context)