65 |
* |
* |
66 |
* @param ptr the pointer to the QPainter object. |
* @param ptr the pointer to the QPainter object. |
67 |
*/ |
*/ |
68 |
public QtComponentGraphics(long ptr, QtComponentPeer component) |
public QtComponentGraphics(long ptr, QtComponentPeer component, |
69 |
|
int x, int y, int w, int h) |
70 |
{ |
{ |
71 |
nativeObject = ptr; |
nativeObject = ptr; |
72 |
peer = component; |
peer = component; |
73 |
|
|
74 |
Rectangle r = component.owner.getBounds(); |
Rectangle r = new Rectangle(x, y, w, h); |
|
r.setLocation(0, 0); |
|
75 |
initialClip = r; |
initialClip = r; |
76 |
|
|
77 |
currentAlpha = 1.0; |
setAlpha( 1.0 ); |
78 |
Color c = component.owner.getBackground(); |
Color c = component.owner.getBackground(); |
79 |
if(c == null) |
if(c == null) |
80 |
setBackground(Color.white); |
setBackground(Color.white); |
86 |
setColor( Color.black ); |
setColor( Color.black ); |
87 |
else |
else |
88 |
setColor( c ); |
setColor( c ); |
|
|
|
89 |
setup(); |
setup(); |
90 |
setClip( initialClip ); |
setClip( initialClip ); |
91 |
} |
} |