Class Canvas

java.lang.Object
com.codename1.charts.compat.Canvas

public class Canvas extends Object

An internal compatibility class for use by the Charts library. Since the library was ported from an Android library, it made use of Canvas and Paint, so rather than rewriting all of this, we added a Canvas and Paint compatibility layer.

DO NOT USE DIRECTLY

  • Field Details

    • g

      public Graphics g
    • bounds

      public Rectangle bounds
    • absoluteX

      public int absoluteX
    • absoluteY

      public int absoluteY
  • Constructor Details

    • Canvas

      public Canvas()
  • Method Details

    • getClipBounds

      public void getClipBounds(Rectangle mRect)
    • drawRect

      public void drawRect(float left, float top, float right, float bottom, Paint paint)
    • drawText

      public void drawText(String string, float x, float y, Paint paint)
    • getHeight

      public int getHeight()
    • getWidth

      public int getWidth()
    • drawPath

      public void drawPath(Shape p, Paint paint)
    • drawLine

      public void drawLine(float x1, float y1, float x2, float y2, Paint paint)
    • rotate

      public void rotate(float angle, float x, float y)
    • scale

      public void scale(float x, float y)
    • translate

      public void translate(float x, float y)
    • drawCircle

      public void drawCircle(float cx, float cy, float r, Paint paint)
    • drawArc

      public void drawArc(Rectangle2D oval, float currentAngle, float sweepAngle, boolean useCenter, Paint paint)
    • drawArcWithGradient

      public void drawArcWithGradient(Rectangle2D oval, float currentAngle, float sweepAngle, boolean useCenter, Paint paint, GradientDrawable gradient)
    • drawPoint

      public void drawPoint(Float get, Float get0, Paint paint)
    • drawRoundRect

      public void drawRoundRect(Rectangle2D rect, float rx, float ry, Paint mPaint)
    • drawBitmap

      public void drawBitmap(Image img, float left, float top, Paint paint)
    • isShapeClipSupported

      public boolean isShapeClipSupported()