use of com.codename1.charts.compat.Paint in project CodenameOne by codenameone.
the class BlackBerryCanvas method clipOnLWUITBounds.
/*public void subpaint(Graphics g) {
paint(g);
}*/
/**
* Clips the RIM native graphics based on the component hierarchy within LWUIT
* so the native RIM component doesn't paint itself above other components such
* as the forms title.
*/
private int clipOnLWUITBounds(Component lwuitComponent, Graphics rimGraphics) {
int result = 0;
Component parent = lwuitComponent;
while (parent != null) {
int x = parent.getAbsoluteX() + parent.getScrollX();
int y = parent.getAbsoluteY() + parent.getScrollY();
rimGraphics.pushRegion(x, y, parent.getWidth(), parent.getHeight(), 0, 0);
rimGraphics.translate(-rimGraphics.getTranslateX(), -rimGraphics.getTranslateY());
parent = parent.getParent();
result++;
}
return result;
}
Aggregations