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

Lines Matching refs:context

8 def drawQuartzRomanText(context):
18 CGContextSetFillColorSpace(context,
24 CGContextSetTextMatrix(context, CGAffineTransformIdentity)
28 CGContextSelectFont(context, "Times-Roman", fontSize, kCGEncodingMacRoman)
31 CGContextShowTextAtPoint(context, 70, 400, text, textlen)
34 CGContextSetFillColor(context, opaqueRed)
37 CGContextShowText(context, text, textlen)
41 p = CGContextGetTextPosition(context)
43 CGContextTranslateCTM(context, p.x, p.y)
47 CGContextRotateCTM(context, Utilities.DEGREES_TO_RADIANS(-90))
49 CGContextSetFillColor(context, opaqueBlack)
50 CGContextShowTextAtPoint(context, 0, 0, text, textlen)
53 CGContextSetFillColor(context, opaqueRed)
54 CGContextShowText(context, text, textlen)
57 def myCGContextStrokeLineSegments(context, s, count):
64 CGContextStrokeLineSegments(context, s, count)
66 CGContextBeginPath(context)
68 CGContextMoveToPoint(context, s[k].x, s[k].y)
69 CGContextAddLineToPoint(context, s[k+1].x, s[k+1].y)
70 CGContextStrokePath(context)
73 def drawGridLines(context):
90 myCGContextStrokeLineSegments(context, _gridLines, len(_gridLines))
92 def drawQuartzTextWithTextModes(context):
106 CGContextSetFillColorSpace(context,
108 CGContextSetStrokeColorSpace(context,
114 CGContextSetTextMatrix(context, CGAffineTransformIdentity)
118 CGContextSelectFont(context, "Times-Roman", fontSize, kCGEncodingMacRoman)
123 CGContextShowTextAtPoint(context, 10, 400, fillText, len(fillText))
126 CGContextSetFillColor(context, opaqueRed)
128 CGContextSetTextPosition(context, 180, 400)
129 CGContextShowText(context, fillText, len(fillText))
132 CGContextTranslateCTM(context, 0, -(fontSize + extraLeading))
139 CGContextSetTextDrawingMode(context, kCGTextStroke)
140 CGContextShowTextAtPoint(context, 10, 400, strokeText, len(strokeText))
144 CGContextSetLineWidth(context, 2)
145 CGContextSetLineDash(context, 0, dash, 2)
147 CGContextSetTextPosition(context, 180, 400)
148 CGContextShowText(context, strokeText, len(strokeText))
151 CGContextSetLineDash(context, 0, None, 0)
152 CGContextSetLineWidth(context, 1)
155 CGContextTranslateCTM(context, 0, -(fontSize + extraLeading))
162 CGContextSetTextDrawingMode(context, kCGTextFillStroke)
163 CGContextShowTextAtPoint(context, 10, 400,
167 CGContextSetLineWidth(context, 2)
168 CGContextSetTextPosition(context, 180, 400)
169 CGContextShowText(context, fillAndStrokeText, len(fillAndStrokeText))
171 CGContextSetLineWidth(context, 1)
172 CGContextTranslateCTM(context, 0, -(fontSize + extraLeading))
179 CGContextSetTextDrawingMode(context, kCGTextInvisible)
180 CGContextShowTextAtPoint(context, 10, 400,
183 CGContextSetTextDrawingMode(context, kCGTextFill)
185 CGContextSetTextPosition(context, 180, 400)
186 CGContextShowText(context, fillText, len(fillText))
188 CGContextTranslateCTM(context, 0, -(fontSize + extraLeading))
191 CGContextSaveGState(context)
194 CGContextSetTextDrawingMode(context, kCGTextClip)
195 CGContextShowTextAtPoint(context, 10, 400, clipText, len(clipText))
198 CGContextTranslateCTM(context, 10, 400)
199 drawGridLines(context)
200 CGContextRestoreGState(context)
202 CGContextSaveGState(context)
211 nextTextPosition = CGContextGetTextPosition(context)
215 CGContextSetTextDrawingMode(context, kCGTextFillStrokeClip)
218 CGContextSetTextPosition(context, 180, 400)
219 nextTextPosition = CGContextGetTextPosition(context)
221 CGContextShowText(context, fillStrokeClipText, len(fillStrokeClipText))
224 CGContextTranslateCTM(context, nextTextPosition.x, nextTextPosition.y)
226 drawGridLines(context)
227 CGContextRestoreGState(context)
263 def drawQuartzTextWithTextMatrix(context):
272 CGContextSetTextMatrix(context, CGAffineTransformIdentity)
276 CGContextSelectFont(context, "Times-Roman", fontSize, kCGEncodingMacRoman)
281 CGContextShowTextAtPoint(context, 10, 600, text, textlen)
285 textPosition = CGContextGetTextPosition(context)
290 CGContextSetTextMatrix(context, t)
293 CGContextSetTextPosition(context, textPosition.x, textPosition.y)
297 CGContextShowText(context, text, textlen)
302 CGContextTranslateCTM(context, 0, -(3*fontSize + extraLeading))
304 CGContextSaveGState(context)
312 CGContextSetTextMatrix(context, t)
316 CGContextShowTextAtPoint(context, 10, 600, text, textlen)
321 CGContextRestoreGState(context)
328 CGContextShowText(context, text, textlen)
332 CGContextTranslateCTM(context, 0, -(fontSize + extraLeading))
335 CGContextSetTextMatrix(context, CGAffineTransformIdentity)
338 CGContextSaveGState(context)
344 CGContextConcatCTM(context, CGAffineTransformMake(1, 0, 0, -1, 0, 600))
346 CGContextShowTextAtPoint(context, 10, 10, text, textlen)
348 textPosition = CGContextGetTextPosition(context)
350 showFlippedTextAtPoint(context, textPosition.x, textPosition.y, text, textlen)
351 CGContextRestoreGState(context)