Code example for Paint

Methods: getColor, getStyle, setColor, setStyle

0
        } 
 
        public void drawLeadingMargin(Canvas c, Paint p, int x, int dir,
                int top, int baseline, int bottom, CharSequence text,
                int start, int end, boolean first, Layout layout) {
            final Style style = p.getStyle();
            final int color = p.getColor();
 
            p.setStyle(FILL);
            p.setColor(this.color);
 
            c.drawRect(x, top, x + dir * 6, bottom, p);
 
            p.setStyle(style);
            p.setColor(color);
        } 
    } 
 
    private static final String TAG_ROOT = "githubroot";
 
    private static final String ROOT_START = '<' + TAG_ROOT + '>';