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

5.6lbs DC 12V Holding Electromagnet Lift Solenoid 08HE
$2.34
5.6lbs DC 12V Holding Electromagnet Lift Solenoid 08HE pictureSTO Fresh 5 Way 2 Position Pneumatic Solenoid Valve 1/4
$11.47
STO Fresh 5 Way 2 Position Pneumatic Solenoid Valve 1/4 pictureHill Rom Total Care Valve Solenoid 2W/2P Deltrol - Part #6543035
$45.0
Hill Rom Total Care Valve Solenoid 2W/2P Deltrol - Part #6543035 picture Pneutronics 50PSI 12VDC Miniature Solenoid Valve 991-0003001-044 25123NV12P
$6.99
 Pneutronics 50PSI 12VDC Miniature Solenoid Valve 991-0003001-044 25123NV12P pictureNEW Dynamco X178 Direct Operating Mini Miniature Pneumatic Solenoid Valve
$9.99
NEW Dynamco X178 Direct Operating Mini Miniature Pneumatic Solenoid Valve picture






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