143 |
} |
} |
144 |
|
|
145 |
public synchronized native void delete(); |
public synchronized native void delete(); |
146 |
public synchronized native void dispose(); |
|
147 |
|
public void dispose() |
148 |
|
{ |
149 |
|
} |
150 |
|
|
151 |
// ********************** etc ******************************* |
// ********************** etc ******************************* |
152 |
|
|
158 |
setTransform( current ); |
setTransform( current ); |
159 |
} |
} |
160 |
|
|
161 |
// NOTE: Image here must be a QImage or wrapper! |
protected native void initImage(QtImage image); |
162 |
protected native void initImage(Image image); |
protected native void initVolatileImage(QtVolatileImage image); |
163 |
|
|
164 |
// Creates a new native QPainter object on the same context. |
// Creates a new native QPainter object on the same context. |
165 |
private native void cloneNativeContext( QtGraphics parent ); |
private native void cloneNativeContext( QtGraphics parent ); |
182 |
private native void setFontNative(QtFontPeer font); |
private native void setFontNative(QtFontPeer font); |
183 |
private native QPainterPath getClipNative(); |
private native QPainterPath getClipNative(); |
184 |
|
|
185 |
private void setAlpha(double alpha) |
void setAlpha(double alpha) |
186 |
{ |
{ |
187 |
currentAlpha = alpha; |
currentAlpha = alpha; |
188 |
setAlphaNative(currentAlpha); |
setAlphaNative(currentAlpha); |
208 |
|
|
209 |
public void setColor(Color c) |
public void setColor(Color c) |
210 |
{ |
{ |
211 |
this.color = c; |
if( c == null ) |
212 |
|
c = Color.white; |
213 |
|
this.color = c; |
214 |
int alpha = (int)(c.getAlpha() * currentAlpha); |
int alpha = (int)(c.getAlpha() * currentAlpha); |
215 |
setColor(c.getRed(), c.getGreen(), c.getBlue(), alpha); |
setColor(c.getRed(), c.getGreen(), c.getBlue(), alpha); |
216 |
} |
} |
254 |
|
|
255 |
public void setFont(Font font) |
public void setFont(Font font) |
256 |
{ |
{ |
257 |
|
if( font == null ) |
258 |
|
return; |
259 |
this.font = font; |
this.font = font; |
260 |
if(font.getPeer() != null && font.getPeer() instanceof QtFontPeer) |
if(font.getPeer() != null && font.getPeer() instanceof QtFontPeer) |
261 |
setFontNative( (QtFontPeer)font.getPeer() ); |
setFontNative( (QtFontPeer)font.getPeer() ); |