Package org.robovm.apple.coregraphics
Class CGContext
- java.lang.Object
-
- org.robovm.rt.bro.NativeObject
-
- org.robovm.apple.corefoundation.CFType
-
- org.robovm.apple.coregraphics.CGContext
-
- All Implemented Interfaces:
java.lang.AutoCloseable
- Direct Known Subclasses:
CGBitmapContext
,CGPDFContext
public class CGContext extends CFType
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CGContext.CGContextPtr
-
Nested classes/interfaces inherited from class org.robovm.apple.corefoundation.CFType
CFType.AsListMarshaler, CFType.CFTypePtr, CFType.Marshaler, CFType.NoRetainMarshaler
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
CGContext()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
addArc(double x, double y, double radius, double startAngle, double endAngle, int clockwise)
void
addArcToPoint(double x1, double y1, double x2, double y2, double radius)
void
addCurveToPoint(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y)
void
addEllipseInRect(CGRect rect)
void
addLines(CGPoint[] points)
void
addLineToPoint(double x, double y)
void
addPath(CGPath path)
void
addQuadCurveToPoint(double cpx, double cpy, double x, double y)
void
addRect(CGRect rect)
void
addRects(CGRect[] rects)
void
beginPage(CGRect mediaBox)
void
beginPath()
void
beginTransparencyLayer(CGRect rect, NSDictionary auxInfo)
void
beginTransparencyLayer(NSDictionary auxiliaryInfo)
void
clearRect(CGRect rect)
void
clip()
void
clipToMask(CGRect rect, CGImage mask)
void
clipToRect(CGRect rect)
void
clipToRects(CGRect[] rects)
void
closePath()
void
concatCTM(CGAffineTransform transform)
CGPoint
convertPointToDeviceSpace(CGPoint point)
CGPoint
convertPointToUserSpace(CGPoint point)
CGRect
convertRectToDeviceSpace(CGRect rect)
CGRect
convertRectToUserSpace(CGRect rect)
CGSize
convertSizeToDeviceSpace(CGSize size)
CGSize
convertSizeToUserSpace(CGSize size)
void
drawImage(CGRect rect, CGImage image)
void
drawLayerAtPoint(CGPoint point, CGLayer layer)
void
drawLayerInRect(CGRect rect, CGLayer layer)
void
drawLinearGradient(CGGradient gradient, CGPoint startPoint, CGPoint endPoint, CGGradientDrawingOptions options)
void
drawPath(CGPathDrawingMode mode)
void
drawPDFPage(CGPDFPage page)
void
drawRadialGradient(CGGradient gradient, CGPoint startCenter, double startRadius, CGPoint endCenter, double endRadius, CGGradientDrawingOptions options)
void
drawShading(CGShading shading)
void
drawTiledImage(CGRect rect, CGImage image)
void
endPage()
void
endTransparencyLayer()
void
evenOddClip()
void
evenOddFillPath()
void
fillEllipseInRect(CGRect rect)
void
fillPath()
void
fillRect(CGRect rect)
void
fillRects(CGRect[] rects)
void
flush()
static long
getClassTypeID()
CGRect
getClipBoundingBox()
CGAffineTransform
getCTM()
CGInterpolationQuality
getInterpolationQuality()
CGPath
getPath()
CGRect
getPathBoundingBox()
CGPoint
getPathCurrentPoint()
CGAffineTransform
getTextMatrix()
CGPoint
getTextPosition()
CGAffineTransform
getUserSpaceToDeviceSpaceTransform()
boolean
isPathEmpty()
void
moveToPoint(double x, double y)
boolean
pathContainsPoint(CGPoint point, CGPathDrawingMode mode)
void
replacePathWithStrokedPath()
void
resetClip()
void
restoreGState()
void
rotateCTM(double angle)
void
saveGState()
void
scaleCTM(double sx, double sy)
void
selectFont(java.lang.String name, double size, CGTextEncoding textEncoding)
Deprecated.Deprecated in iOS 7.0.void
setAllowsAntialiasing(boolean allowsAntialiasing)
void
setAllowsFontSmoothing(boolean allowsFontSmoothing)
void
setAllowsFontSubpixelPositioning(boolean allowsFontSubpixelPositioning)
void
setAllowsFontSubpixelQuantization(boolean allowsFontSubpixelQuantization)
void
setAlpha(double alpha)
void
setBlendMode(CGBlendMode mode)
void
setCharacterSpacing(double spacing)
void
setCMYKFillColor(double cyan, double magenta, double yellow, double black, double alpha)
void
setCMYKStrokeColor(double cyan, double magenta, double yellow, double black, double alpha)
void
setFillColor(double[] components)
void
setFillColor(float[] components)
void
setFillColor(CGColor color)
void
setFillColorSpace(CGColorSpace space)
void
setFillPattern(CGPattern pattern, double[] components)
void
setFillPattern(CGPattern pattern, float[] components)
void
setFlatness(double flatness)
void
setFont(CGFont font)
void
setFontSize(double size)
void
setGrayFillColor(double gray, double alpha)
void
setGrayStrokeColor(double gray, double alpha)
void
setInterpolationQuality(CGInterpolationQuality quality)
void
setLineCap(CGLineCap cap)
void
setLineDash(double phase, double[] lengths)
void
setLineDash(double phase, float[] lengths, long count)
void
setLineJoin(CGLineJoin join)
void
setLineWidth(double width)
void
setMiterLimit(double limit)
void
setPatternPhase(CGSize phase)
void
setRenderingIntent(CGColorRenderingIntent intent)
void
setRGBFillColor(double red, double green, double blue, double alpha)
void
setRGBStrokeColor(double red, double green, double blue, double alpha)
void
setShadow(CGSize offset, double blur)
void
setShadow(CGSize offset, double blur, CGColor color)
void
setShouldAntialias(boolean shouldAntialias)
void
setShouldSmoothFonts(boolean shouldSmoothFonts)
void
setShouldSubpixelPositionFonts(boolean shouldSubpixelPositionFonts)
void
setShouldSubpixelQuantizeFonts(boolean shouldSubpixelQuantizeFonts)
void
setStrokeColor(double[] components)
void
setStrokeColor(float[] components)
void
setStrokeColor(CGColor color)
void
setStrokeColorSpace(CGColorSpace space)
void
setStrokePattern(CGPattern pattern, double[] components)
void
setStrokePattern(CGPattern pattern, float[] components)
void
setTextDrawingMode(CGTextDrawingMode mode)
void
setTextMatrix(CGAffineTransform t)
void
setTextPosition(double x, double y)
void
showGlyphs(char[] glyphs)
Deprecated.Deprecated in iOS 7.0.void
showGlyphsAtPoint(double x, double y, char[] glyphs)
Deprecated.Deprecated in iOS 7.0.void
showGlyphsAtPositions(char[] glyphs, CGPoint[] positions, long count)
void
showGlyphsWithAdvances(char[] glyphs, CGSize[] advances)
Deprecated.Deprecated in iOS 7.0.void
showText(java.lang.String string)
Deprecated.Deprecated in iOS 7.0.void
showTextAtPoint(double x, double y, java.lang.String string)
Deprecated.Deprecated in iOS 7.0.void
strokeEllipseInRect(CGRect rect)
void
strokeLineSegments(CGPoint[] points)
void
strokePath()
void
strokeRect(CGRect rect)
void
strokeRect(CGRect rect, double width)
void
synchronize()
void
translateCTM(double tx, double ty)
-
Methods inherited from class org.robovm.apple.corefoundation.CFType
autorelease, close, dispose, dispose, doDispose, equalsTo, finalize, getAllocator, getDescription, getRetainCount, getTypeID, getTypeIDDescription, hash, makeCollectable, release, release, retain, retain, show, toString
-
-
-
-
Method Detail
-
addRects
public void addRects(CGRect[] rects)
-
addLines
public void addLines(CGPoint[] points)
-
clipToRects
public void clipToRects(CGRect[] rects)
-
fillRects
public void fillRects(CGRect[] rects)
-
setFillColor
public void setFillColor(double[] components)
-
setFillColor
public void setFillColor(float[] components)
-
setStrokeColor
public void setStrokeColor(double[] components)
-
setStrokeColor
public void setStrokeColor(float[] components)
-
setFillPattern
public void setFillPattern(CGPattern pattern, double[] components)
-
setFillPattern
public void setFillPattern(CGPattern pattern, float[] components)
-
setStrokePattern
public void setStrokePattern(CGPattern pattern, double[] components)
-
setStrokePattern
public void setStrokePattern(CGPattern pattern, float[] components)
-
setLineDash
public void setLineDash(double phase, double[] lengths)
-
setLineDash
public void setLineDash(double phase, float[] lengths, long count)
-
strokeLineSegments
public void strokeLineSegments(CGPoint[] points)
-
selectFont
@Deprecated public void selectFont(java.lang.String name, double size, CGTextEncoding textEncoding)
Deprecated.Deprecated in iOS 7.0.- Since:
- Available in iOS 2.0 and later.
-
showText
@Deprecated public void showText(java.lang.String string)
Deprecated.Deprecated in iOS 7.0.- Since:
- Available in iOS 2.0 and later.
-
showTextAtPoint
@Deprecated public void showTextAtPoint(double x, double y, java.lang.String string)
Deprecated.Deprecated in iOS 7.0.- Since:
- Available in iOS 2.0 and later.
-
showGlyphs
@Deprecated public void showGlyphs(char[] glyphs)
Deprecated.Deprecated in iOS 7.0.- Since:
- Available in iOS 2.0 and later.
-
showGlyphsAtPoint
@Deprecated public void showGlyphsAtPoint(double x, double y, char[] glyphs)
Deprecated.Deprecated in iOS 7.0.- Since:
- Available in iOS 2.0 and later.
-
showGlyphsAtPositions
public void showGlyphsAtPositions(char[] glyphs, CGPoint[] positions, long count)
-
showGlyphsWithAdvances
@Deprecated public void showGlyphsWithAdvances(char[] glyphs, CGSize[] advances)
Deprecated.Deprecated in iOS 7.0.- Since:
- Available in iOS 2.0 and later.
-
getClassTypeID
public static long getClassTypeID()
- Since:
- Available in iOS 2.0 and later.
-
saveGState
public void saveGState()
- Since:
- Available in iOS 2.0 and later.
-
restoreGState
public void restoreGState()
- Since:
- Available in iOS 2.0 and later.
-
scaleCTM
public void scaleCTM(double sx, double sy)
- Since:
- Available in iOS 2.0 and later.
-
translateCTM
public void translateCTM(double tx, double ty)
- Since:
- Available in iOS 2.0 and later.
-
rotateCTM
public void rotateCTM(double angle)
- Since:
- Available in iOS 2.0 and later.
-
concatCTM
public void concatCTM(CGAffineTransform transform)
- Since:
- Available in iOS 2.0 and later.
-
getCTM
public CGAffineTransform getCTM()
- Since:
- Available in iOS 2.0 and later.
-
setLineWidth
public void setLineWidth(double width)
- Since:
- Available in iOS 2.0 and later.
-
setLineCap
public void setLineCap(CGLineCap cap)
- Since:
- Available in iOS 2.0 and later.
-
setLineJoin
public void setLineJoin(CGLineJoin join)
- Since:
- Available in iOS 2.0 and later.
-
setMiterLimit
public void setMiterLimit(double limit)
- Since:
- Available in iOS 2.0 and later.
-
setFlatness
public void setFlatness(double flatness)
- Since:
- Available in iOS 2.0 and later.
-
setAlpha
public void setAlpha(double alpha)
- Since:
- Available in iOS 2.0 and later.
-
setBlendMode
public void setBlendMode(CGBlendMode mode)
- Since:
- Available in iOS 2.0 and later.
-
beginPath
public void beginPath()
- Since:
- Available in iOS 2.0 and later.
-
moveToPoint
public void moveToPoint(double x, double y)
- Since:
- Available in iOS 2.0 and later.
-
addLineToPoint
public void addLineToPoint(double x, double y)
- Since:
- Available in iOS 2.0 and later.
-
addCurveToPoint
public void addCurveToPoint(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y)
- Since:
- Available in iOS 2.0 and later.
-
addQuadCurveToPoint
public void addQuadCurveToPoint(double cpx, double cpy, double x, double y)
- Since:
- Available in iOS 2.0 and later.
-
closePath
public void closePath()
- Since:
- Available in iOS 2.0 and later.
-
addRect
public void addRect(CGRect rect)
- Since:
- Available in iOS 2.0 and later.
-
addEllipseInRect
public void addEllipseInRect(CGRect rect)
- Since:
- Available in iOS 2.0 and later.
-
addArc
public void addArc(double x, double y, double radius, double startAngle, double endAngle, int clockwise)
- Since:
- Available in iOS 2.0 and later.
-
addArcToPoint
public void addArcToPoint(double x1, double y1, double x2, double y2, double radius)
- Since:
- Available in iOS 2.0 and later.
-
addPath
public void addPath(CGPath path)
- Since:
- Available in iOS 2.0 and later.
-
replacePathWithStrokedPath
public void replacePathWithStrokedPath()
- Since:
- Available in iOS 2.0 and later.
-
isPathEmpty
public boolean isPathEmpty()
- Since:
- Available in iOS 2.0 and later.
-
getPathCurrentPoint
public CGPoint getPathCurrentPoint()
- Since:
- Available in iOS 2.0 and later.
-
getPathBoundingBox
public CGRect getPathBoundingBox()
- Since:
- Available in iOS 2.0 and later.
-
getPath
public CGPath getPath()
- Since:
- Available in iOS 2.0 and later.
-
pathContainsPoint
public boolean pathContainsPoint(CGPoint point, CGPathDrawingMode mode)
- Since:
- Available in iOS 2.0 and later.
-
drawPath
public void drawPath(CGPathDrawingMode mode)
- Since:
- Available in iOS 2.0 and later.
-
fillPath
public void fillPath()
- Since:
- Available in iOS 2.0 and later.
-
evenOddFillPath
public void evenOddFillPath()
- Since:
- Available in iOS 2.0 and later.
-
strokePath
public void strokePath()
- Since:
- Available in iOS 2.0 and later.
-
fillRect
public void fillRect(CGRect rect)
- Since:
- Available in iOS 2.0 and later.
-
strokeRect
public void strokeRect(CGRect rect)
- Since:
- Available in iOS 2.0 and later.
-
strokeRect
public void strokeRect(CGRect rect, double width)
- Since:
- Available in iOS 2.0 and later.
-
clearRect
public void clearRect(CGRect rect)
- Since:
- Available in iOS 2.0 and later.
-
fillEllipseInRect
public void fillEllipseInRect(CGRect rect)
- Since:
- Available in iOS 2.0 and later.
-
strokeEllipseInRect
public void strokeEllipseInRect(CGRect rect)
- Since:
- Available in iOS 2.0 and later.
-
clip
public void clip()
- Since:
- Available in iOS 2.0 and later.
-
evenOddClip
public void evenOddClip()
- Since:
- Available in iOS 2.0 and later.
-
resetClip
public void resetClip()
-
clipToMask
public void clipToMask(CGRect rect, CGImage mask)
- Since:
- Available in iOS 2.0 and later.
-
getClipBoundingBox
public CGRect getClipBoundingBox()
- Since:
- Available in iOS 2.0 and later.
-
clipToRect
public void clipToRect(CGRect rect)
- Since:
- Available in iOS 2.0 and later.
-
setFillColor
public void setFillColor(CGColor color)
- Since:
- Available in iOS 2.0 and later.
-
setStrokeColor
public void setStrokeColor(CGColor color)
- Since:
- Available in iOS 2.0 and later.
-
setFillColorSpace
public void setFillColorSpace(CGColorSpace space)
- Since:
- Available in iOS 2.0 and later.
-
setStrokeColorSpace
public void setStrokeColorSpace(CGColorSpace space)
- Since:
- Available in iOS 2.0 and later.
-
setPatternPhase
public void setPatternPhase(CGSize phase)
- Since:
- Available in iOS 2.0 and later.
-
setGrayFillColor
public void setGrayFillColor(double gray, double alpha)
- Since:
- Available in iOS 2.0 and later.
-
setGrayStrokeColor
public void setGrayStrokeColor(double gray, double alpha)
- Since:
- Available in iOS 2.0 and later.
-
setRGBFillColor
public void setRGBFillColor(double red, double green, double blue, double alpha)
- Since:
- Available in iOS 2.0 and later.
-
setRGBStrokeColor
public void setRGBStrokeColor(double red, double green, double blue, double alpha)
- Since:
- Available in iOS 2.0 and later.
-
setCMYKFillColor
public void setCMYKFillColor(double cyan, double magenta, double yellow, double black, double alpha)
- Since:
- Available in iOS 2.0 and later.
-
setCMYKStrokeColor
public void setCMYKStrokeColor(double cyan, double magenta, double yellow, double black, double alpha)
- Since:
- Available in iOS 2.0 and later.
-
setRenderingIntent
public void setRenderingIntent(CGColorRenderingIntent intent)
- Since:
- Available in iOS 2.0 and later.
-
drawTiledImage
public void drawTiledImage(CGRect rect, CGImage image)
- Since:
- Available in iOS 2.0 and later.
-
getInterpolationQuality
public CGInterpolationQuality getInterpolationQuality()
- Since:
- Available in iOS 2.0 and later.
-
setInterpolationQuality
public void setInterpolationQuality(CGInterpolationQuality quality)
- Since:
- Available in iOS 2.0 and later.
-
setShadow
public void setShadow(CGSize offset, double blur, CGColor color)
- Since:
- Available in iOS 2.0 and later.
-
setShadow
public void setShadow(CGSize offset, double blur)
- Since:
- Available in iOS 2.0 and later.
-
drawLinearGradient
public void drawLinearGradient(CGGradient gradient, CGPoint startPoint, CGPoint endPoint, CGGradientDrawingOptions options)
- Since:
- Available in iOS 2.0 and later.
-
drawRadialGradient
public void drawRadialGradient(CGGradient gradient, CGPoint startCenter, double startRadius, CGPoint endCenter, double endRadius, CGGradientDrawingOptions options)
- Since:
- Available in iOS 2.0 and later.
-
drawShading
public void drawShading(CGShading shading)
- Since:
- Available in iOS 2.0 and later.
-
setCharacterSpacing
public void setCharacterSpacing(double spacing)
- Since:
- Available in iOS 2.0 and later.
-
setTextPosition
public void setTextPosition(double x, double y)
- Since:
- Available in iOS 2.0 and later.
-
getTextPosition
public CGPoint getTextPosition()
- Since:
- Available in iOS 2.0 and later.
-
setTextMatrix
public void setTextMatrix(CGAffineTransform t)
- Since:
- Available in iOS 2.0 and later.
-
getTextMatrix
public CGAffineTransform getTextMatrix()
- Since:
- Available in iOS 2.0 and later.
-
setTextDrawingMode
public void setTextDrawingMode(CGTextDrawingMode mode)
- Since:
- Available in iOS 2.0 and later.
-
setFont
public void setFont(CGFont font)
- Since:
- Available in iOS 2.0 and later.
-
setFontSize
public void setFontSize(double size)
- Since:
- Available in iOS 2.0 and later.
-
drawPDFPage
public void drawPDFPage(CGPDFPage page)
- Since:
- Available in iOS 2.0 and later.
-
beginPage
public void beginPage(CGRect mediaBox)
- Since:
- Available in iOS 2.0 and later.
-
endPage
public void endPage()
- Since:
- Available in iOS 2.0 and later.
-
flush
public void flush()
- Since:
- Available in iOS 2.0 and later.
-
synchronize
public void synchronize()
- Since:
- Available in iOS 2.0 and later.
-
setShouldAntialias
public void setShouldAntialias(boolean shouldAntialias)
- Since:
- Available in iOS 2.0 and later.
-
setAllowsAntialiasing
public void setAllowsAntialiasing(boolean allowsAntialiasing)
- Since:
- Available in iOS 2.0 and later.
-
setShouldSmoothFonts
public void setShouldSmoothFonts(boolean shouldSmoothFonts)
- Since:
- Available in iOS 2.0 and later.
-
setAllowsFontSmoothing
public void setAllowsFontSmoothing(boolean allowsFontSmoothing)
- Since:
- Available in iOS 2.0 and later.
-
setShouldSubpixelPositionFonts
public void setShouldSubpixelPositionFonts(boolean shouldSubpixelPositionFonts)
- Since:
- Available in iOS 2.0 and later.
-
setAllowsFontSubpixelPositioning
public void setAllowsFontSubpixelPositioning(boolean allowsFontSubpixelPositioning)
- Since:
- Available in iOS 2.0 and later.
-
setShouldSubpixelQuantizeFonts
public void setShouldSubpixelQuantizeFonts(boolean shouldSubpixelQuantizeFonts)
- Since:
- Available in iOS 2.0 and later.
-
setAllowsFontSubpixelQuantization
public void setAllowsFontSubpixelQuantization(boolean allowsFontSubpixelQuantization)
- Since:
- Available in iOS 2.0 and later.
-
beginTransparencyLayer
public void beginTransparencyLayer(NSDictionary auxiliaryInfo)
- Since:
- Available in iOS 2.0 and later.
-
beginTransparencyLayer
public void beginTransparencyLayer(CGRect rect, NSDictionary auxInfo)
- Since:
- Available in iOS 2.0 and later.
-
endTransparencyLayer
public void endTransparencyLayer()
- Since:
- Available in iOS 2.0 and later.
-
getUserSpaceToDeviceSpaceTransform
public CGAffineTransform getUserSpaceToDeviceSpaceTransform()
- Since:
- Available in iOS 2.0 and later.
-
convertPointToDeviceSpace
public CGPoint convertPointToDeviceSpace(CGPoint point)
- Since:
- Available in iOS 2.0 and later.
-
convertPointToUserSpace
public CGPoint convertPointToUserSpace(CGPoint point)
- Since:
- Available in iOS 2.0 and later.
-
convertSizeToDeviceSpace
public CGSize convertSizeToDeviceSpace(CGSize size)
- Since:
- Available in iOS 2.0 and later.
-
convertSizeToUserSpace
public CGSize convertSizeToUserSpace(CGSize size)
- Since:
- Available in iOS 2.0 and later.
-
convertRectToDeviceSpace
public CGRect convertRectToDeviceSpace(CGRect rect)
- Since:
- Available in iOS 2.0 and later.
-
convertRectToUserSpace
public CGRect convertRectToUserSpace(CGRect rect)
- Since:
- Available in iOS 2.0 and later.
-
drawLayerInRect
public void drawLayerInRect(CGRect rect, CGLayer layer)
- Since:
- Available in iOS 2.0 and later.
-
-