Uses of Class
playn.core.Canvas

  • Uses of Canvas in playn.core

    Methods in playn.core that return Canvas
    Modifier and Type
    Method
    Description
    abstract Canvas
    Canvas.clear()
    Clears the entire canvas to rgba(0, 0, 0, 0).
    abstract Canvas
    Canvas.clearRect(float x, float y, float width, float height)
    Clears the specified region to rgba (0, 0, 0, 0).
    abstract Canvas
    Canvas.clip(Path clipPath)
    Intersects the current clip with the specified path.
    abstract Canvas
    Canvas.clipRect(float x, float y, float width, float height)
    Intersects the current clip with the supplied rectangle.
    Graphics.createCanvas(float width, float height)
    Creates a Canvas with the specified display unit size.
    abstract Canvas
    Graphics.createCanvas(Scale scale, int pixelWidth, int pixelHeight)
    Creates a Canvas at the specified scale and with the specified (pixel) width and height.
    Graphics.createCanvas(IDimension size)
    Canvas.draw(Canvas.Drawable image, float x, float y)
    Draws image at the specified location (x, y).
    Canvas.draw(Canvas.Drawable image, float x, float y, float w, float h)
    Draws a scaled image at the specified location (x, y) size (w x h).
    Canvas.draw(Canvas.Drawable image, float dx, float dy, float dw, float dh, float sx, float sy, float sw, float sh)
    Draws a subregion of a image (sw x sh) @ (sx, sy) at the specified size (dw x dh) and location (dx, dy).
    abstract Canvas
    Canvas.drawArc(float cx, float cy, float r, float startAngle, float arcAngle)
    Draws an arc of a circle centered at cx, cy, with radius r.
    Canvas.drawCentered(Canvas.Drawable image, float x, float y)
    Draws image centered at the specified location.
    abstract Canvas
    Canvas.drawLine(float x0, float y0, float x1, float y1)
    Draws a line between the two specified points.
    abstract Canvas
    Canvas.drawPoint(float x, float y)
    Draws a single point at the specified location.
    abstract Canvas
    Canvas.drawText(String text, float x, float y)
    Draws text at the specified location.
    abstract Canvas
    Canvas.fillCircle(float x, float y, float radius)
    Fills a circle at the specified center and radius.
    abstract Canvas
    Canvas.fillPath(Path path)
    Fills the specified path.
    abstract Canvas
    Canvas.fillRect(float x, float y, float width, float height)
    Fills the specified rectangle.
    abstract Canvas
    Canvas.fillRoundRect(float x, float y, float width, float height, float radius)
    Fills the specified rounded rectangle.
    abstract Canvas
    Canvas.fillText(TextLayout text, float x, float y)
    Fills the text at the specified location.
    abstract Canvas
    Canvas.restore()
    Restores the canvas's previous state.
    abstract Canvas
    Canvas.rotate(float radians)
    Rotates the current transformation matrix by the specified angle in radians.
    abstract Canvas
    Canvas.save()
    The save and restore methods preserve and restore the state of the canvas, but not specific paths or graphics.
    abstract Canvas
    Canvas.scale(float x, float y)
    Scales the current transformation matrix by the specified amount.
    abstract Canvas
    Canvas.setAlpha(float alpha)
    Set the global alpha value to be used for all painting.
    abstract Canvas
    Sets the Porter-Duff composite operation to be used for all painting.
    abstract Canvas
    Canvas.setFillColor(int color)
    Sets the color to be used for fill operations.
    abstract Canvas
    Canvas.setFillGradient(Gradient gradient)
    Sets the gradient to be used for fill operations.
    abstract Canvas
    Canvas.setFillPattern(Pattern pattern)
    Sets the pattern to be used for fill operations.
    abstract Canvas
    Sets the line-cap mode for strokes.
    abstract Canvas
    Sets the line-join mode for strokes.
    abstract Canvas
    Canvas.setMiterLimit(float miter)
    Sets the miter limit for strokes.
    abstract Canvas
    Canvas.setStrokeColor(int color)
    Sets the color for strokes.
    abstract Canvas
    Canvas.setStrokeWidth(float strokeWidth)
    Sets the width for strokes, in pixels.
    abstract Canvas
    Canvas.strokeCircle(float x, float y, float radius)
    Strokes a circle at the specified center and radius.
    abstract Canvas
    Canvas.strokePath(Path path)
    Strokes the specified path.
    abstract Canvas
    Canvas.strokeRect(float x, float y, float width, float height)
    Strokes the specified rectangle.
    abstract Canvas
    Canvas.strokeRoundRect(float x, float y, float width, float height, float radius)
    Strokes the specified rounded rectangle.
    abstract Canvas
    Canvas.strokeText(TextLayout text, float x, float y)
    Strokes the text at the specified location.
    TextBlock.toCanvas(Graphics gfx, TextBlock.Align align, int fillColor)
    Creates a canvas image large enough to accommodate this text block and renders the lines into it.
    abstract Canvas
    Canvas.transform(float m11, float m12, float m21, float m22, float dx, float dy)
    Multiplies the current transformation matrix by the given matrix.
    abstract Canvas
    Canvas.translate(float x, float y)
    Translates the current transformation matrix by the given amount.
    Methods in playn.core with parameters of type Canvas
    Modifier and Type
    Method
    Description
    void
    TextBlock.fill(Canvas canvas, TextBlock.Align align, float x, float y)
    Fills lines into canvas at the specified coordinates, using the specified alignment.
    void
    TextBlock.stroke(Canvas canvas, TextBlock.Align align, float x, float y)
    Strokes lines into canvas at the specified coordinates, using the specified alignment.