BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 07-16-2007, 10:46 PM   #1 (permalink)
Thumbs Must Hurt
 
Join Date: Jun 2007
Model: 8800
PIN: N/A
Carrier: GPRS
Posts: 68
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default A problem of drawing lines in a image

Please Login to Remove!

Now I'm learning how to draw a line in a image, using the follows:
public void paint(Graphics g)
{
g.drawImage(img,0,0,null);
if(x != 0 && y != 0)
{
g.drawLine(x-5,y,x+5,y);
g.drawLine(x,y-5,x,y+5);
}
}

but I find there is an problem : when I remove the image in the blackberry screen , the line does not remove at the same time. Finally, I find that,when I remove the image ,I repaint the image , and redraw the line . I change the image position by scroll bar, but the position of line doen not change!
I do not want to change the line coordinate value , because I want to draw the line in the image memory, and add it to the screen, how can I do this??
Please give me some advice , thank you!
Offline  
Old 07-19-2007, 03:52 AM   #2 (permalink)
Thumbs Must Hurt
 
Join Date: Jun 2007
Model: 8800
PIN: N/A
Carrier: GPRS
Posts: 68
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Does nobody know how to solve the problem?
help!
Offline  
Closed Thread


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

TOSHIBA TRANSISTOR INVERTOR VF-S7 NON WORKING
$45.0
TOSHIBA TRANSISTOR INVERTOR VF-S7 NON WORKING picture10pc 40A 600V Triacs Thyristor BTA41 600B BTA41-600B TO-3P ST
$22.5
10pc 40A 600V Triacs Thyristor BTA41 600B BTA41-600B TO-3P ST  pictureQTY 6 PN4416A Bench Tested Calorlogic (NTE 312) n ch JFET WORLDWIDE
$12.32
QTY 6  PN4416A Bench Tested Calorlogic (NTE 312)  n ch  JFET  WORLDWIDE picture2x 2N5771 PNP silicon switching BJT transistor 15V 200mA 350mW Motorola NOS
$2.95
2x 2N5771 PNP silicon switching BJT transistor 15V 200mA 350mW Motorola NOS pictureMOS PNP/NPN M328 Mega328 Transistor Tester Diode Triode Capacitance ESR Meter
$6.87
MOS PNP/NPN M328 Mega328 Transistor Tester Diode Triode Capacitance ESR Meter picture






Copyright 2004-2016 BlackBerryForums.com.
The names RIM and BlackBerry are registered Trademarks of BlackBerry Inc.