Code example for Canvas

Methods: getClipBounds

0
    } 
 
    protected void onDraw(Canvas canvas) {
 
        super.onDraw(canvas);
        canvas.getClipBounds(mRect);
    } 
 
    /** 
     * Creates a sample chart. 
     * @param dataset a dataset for the chart. 
     * @return A sample chart. 
     */ 
    private static AFreeChart createChart() { 
        XYDataset dataset = createDataset();
        AFreeChart chart = ChartFactory.createTimeSeriesChart(
                "XYDrawableAnnotationDemo1", 
                null, 
                "$ million", 
                dataset,
                true,