# CanvasRenderingContext2DTGraphics

class CanvasRenderingContext2DTGraphics(gc: CanvasRenderingContext2D) : AbstractTGraphics

Created by luc on 25.04.17.

## Constructors

CanvasRenderingContext2DTGraphics
Link copied to clipboard
constructor(gc: CanvasRenderingContext2D)

## Properties

background
Link copied to clipboard
open override var background: MkColor
colorFactory
Link copied to clipboard
open override val colorFactory: MkColorFactory
font
Link copied to clipboard
open override var font: MkFont
iGraphics
Link copied to clipboard
open override val iGraphics: IGraphics
isAntialias
Link copied to clipboard
open override var isAntialias: Boolean
isInterpolationBilinear
Link copied to clipboard
open override var isInterpolationBilinear: Boolean
isPaintingForPrint
Link copied to clipboard
open override var isPaintingForPrint: Boolean
isTextAntialias
Link copied to clipboard
open override var isTextAntialias: Boolean
nativeGraphics
Link copied to clipboard
open override val nativeGraphics: Any
transform
Link copied to clipboard
open override var transform: AffineTransform?

## Functions

clearRect
Link copied to clipboard
open override fun clearRect(x: Int, y: Int, width: Int, height: Int)
clip
Link copied to clipboard
open override fun clip(s: Shape?)
createImage
Link copied to clipboard
open override fun createImage(width: Int, height: Int): CPImage?
createPolygon
Link copied to clipboard
fun createPolygon(xPoints: IntArray?, yPoints: IntArray?, nPoints: Int, close: Boolean): GeneralPath
drawArc
Link copied to clipboard
open override fun drawArc(x: Int, y: Int, width: Int, height: Int, startAngle: Int, arcAngle: Int)
drawClippedImage
Link copied to clipboard
open override fun drawClippedImage(img: CPImage?, x: Int, y: Int, w: Int, h: Int, width: Int, height: Int, bounds: Rectangle?, shape: Shape?): Boolean
drawImage
Link copied to clipboard
open override fun drawImage(img: CPImage?, x: Int, y: Int): Boolean
drawImageStretch
Link copied to clipboard
open override fun drawImageStretch(img: CPImage?, x: Int, y: Int, w: Int, h: Int): Boolean
drawNativeImage
Link copied to clipboard
fun drawNativeImage(img: CPImage?, x: Int, y: Int): Boolean
drawOval
Link copied to clipboard
open override fun drawOval(x: Int, y: Int, width: Int, height: Int)
drawPolygon
Link copied to clipboard
open override fun drawPolygon(xPoints: IntArray?, yPoints: IntArray?, nPoints: Int)
drawPolyline
Link copied to clipboard
open override fun drawPolyline(xPoints: IntArray?, yPoints: IntArray?, nPoints: Int)
fill
Link copied to clipboard
open override fun fill(s: Shape?)
fillArc
Link copied to clipboard
open override fun fillArc(x: Int, y: Int, width: Int, height: Int, startAngle: Int, arcAngle: Int)
fillOval
Link copied to clipboard
open override fun fillOval(x: Int, y: Int, width: Int, height: Int)
fillPolygon
Link copied to clipboard
open override fun fillPolygon(xPoints: IntArray?, yPoints: IntArray?, nPoints: Int)
fillRect
Link copied to clipboard
open override fun fillRect(x: Double, y: Double, width: Double, height: Double)
fun fillRect(x: Int, y: Int, width: Int, height: Int)
fillRoundRect
Link copied to clipboard
open override fun fillRoundRect(x: Double, y: Double, width: Double, height: Double, arcWidth: Double, arcHeight: Double)
fillText
Link copied to clipboard
open override fun fillText(str: String?, x: Float, y: Float)
fun fillText(label: EnhancedLabel, x: Int, y: Int, w: Int, text: String)
findMaxFontSize
Link copied to clipboard
open override fun findMaxFontSize(elabel: EnhancedLabel?, font: MkFont?, maxWidth: Double): Double
fitTextInsideRectangle
Link copied to clipboard
open override fun fitTextInsideRectangle(elabel: EnhancedLabel?, pf: PreferredSize?, font: MkFont?, bounds: Rectangle2D?, scaleFactor: Double, expand: Boolean): Double
getAscend
Link copied to clipboard
fun getAscend(label: EnhancedLabel): Int
getBackground
Link copied to clipboard
fun getBackground(): MkColor?
getFont
Link copied to clipboard
fun getFont(): MkFont
getLineHeight
Link copied to clipboard
fun getLineHeight(label: EnhancedLabel): Int
getStringWidth
Link copied to clipboard
open override fun getStringWidth(text: String?): Double
hitClip
Link copied to clipboard
open override fun hitClip(bounds: Rectangle?): Boolean
paintLabel
Link copied to clipboard
open override fun paintLabel(label: EnhancedLabel, x: Int, y: Int, w: Int, h: Int)
restore
Link copied to clipboard
open override fun restore()
rotate
Link copied to clipboard
open override fun rotate(theta: Double)
rotateTranslate
Link copied to clipboard
open override fun rotateTranslate(theta: Double, x: Double, y: Double)
save
Link copied to clipboard
open override fun save()
scale
Link copied to clipboard
open override fun scale(sx: Double, sy: Double)
setBackground
Link copied to clipboard
fun setBackground(color: MkColor?)
setColor
Link copied to clipboard
open override fun setColor(c: MkColor?)
setFill
Link copied to clipboard
open override fun setFill(c: MkColor?)
setFont
Link copied to clipboard
fun setFont(font: MkFont)
setGlobalAlpha
Link copied to clipboard
open override fun setGlobalAlpha(alpha: Double)
setLineDash
Link copied to clipboard
open override fun setLineDash(dashPattern: DoubleArray?)
setLineWidth
Link copied to clipboard
open override fun setLineWidth(lw: Double)
setRadialGradient
Link copied to clipboard
open override fun setRadialGradient()
setStroke
Link copied to clipboard
open override fun setStroke(c: MkColor?)
setTransform
Link copied to clipboard
fun setTransform(t: AffineTransform?)
shapeToPath
Link copied to clipboard
fun shapeToPath(s: Shape)
shear
Link copied to clipboard
open override fun shear(shx: Double, shy: Double)
sizeLabel
Link copied to clipboard
open override fun sizeLabel(label: EnhancedLabel, width: Int, height: Int): PreferredSize
softClip
Link copied to clipboard
open override fun softClip(shape: Shape?)
stroke
Link copied to clipboard
open override fun stroke(s: Shape?)
strokeLine
Link copied to clipboard
open override fun strokeLine(x1: Int, y1: Int, x2: Int, y2: Int)
strokeRect
Link copied to clipboard
open override fun strokeRect(x: Double, y: Double, width: Double, height: Double)
strokeRoundRect
Link copied to clipboard
open override fun strokeRoundRect(x: Double, y: Double, width: Double, height: Double, arcWidth: Double, arcHeight: Double)
transform
Link copied to clipboard
open override fun transform(t: AffineTransform?)
translate
Link copied to clipboard
open override fun translate(tx: Double, ty: Double)