paintFigure() problem [message #196845] |
Tue, 27 September 2005 14:11 |
Eclipse User |
|
|
|
Originally posted by: dan.nicolici.nexource.ro
This is a multi-part message in MIME format.
------=_NextPart_000_0027_01C5C386.83CF6BD0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Why does the painting that I do in a Figure's paintFigure() does not =
show?
This:
public void paintFigure(Graphics g) {
//g.drawImage(image, 0, 0);
g.drawLine(0, 0, 10, 10);
super.paintFigure(g);
}
has no effect on the figure (no line is drawn).
------=_NextPart_000_0027_01C5C386.83CF6BD0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2900.2180" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Why does the painting that I do in a =
Figure's=20
paintFigure() does not show?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>This:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2> public void paintFigure(Graphics =
g)=20
{<BR> //g.drawImage(image, 0, =
0);<BR> g.drawLine(0, 0, 10,=20
10);<BR> super.paintFigure(g);<BR> } </FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>has no effect on the figure (no line is =
drawn).</FONT></DIV></BODY></HTML>
------=_NextPart_000_0027_01C5C386.83CF6BD0--
|
|
|
|
Re: paintFigure() problem [message #196860 is a reply to message #196845] |
Tue, 27 September 2005 15:30 |
Eclipse User |
|
|
|
Originally posted by: none.unknown.com
This is a multi-part message in MIME format.
------=_NextPart_000_004F_01C5C356.E3C66140
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Your figure is most likely opaque, and super.paintFigure() is painting =
the background (and hence painting over the line you're drawing). You =
need to draw the line after invoking super.paintFigure().
"Dan Nicolici" <dan.nicolici@nexource.ro> wrote in message =
news:dhbju8$lvt$1@news.eclipse.org...
Why does the painting that I do in a Figure's paintFigure() does not =
show?
This:
public void paintFigure(Graphics g) {
//g.drawImage(image, 0, 0);
g.drawLine(0, 0, 10, 10);
super.paintFigure(g);
}
has no effect on the figure (no line is drawn).
------=_NextPart_000_004F_01C5C356.E3C66140
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2800.1515" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Your figure is most likely opaque, and=20
super.paintFigure() is painting the background (and hence painting over =
the line=20
you're drawing). You need to draw the line after invoking=20
super.paintFigure().</FONT></DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Dan Nicolici" <<A=20
=
href=3D"mailto:dan.nicolici@nexource.ro">dan.nicolici@nexource.ro</A>>=
wrote=20
in message <A=20
=
href=3D"news:dhbju8$lvt$1@news.eclipse.org">news:dhbju8$lvt$1@news.eclips=
e.org</A>...</DIV>
<DIV><FONT face=3DArial size=3D2>Why does the painting that I do in a =
Figure's=20
paintFigure() does not show?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>This:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2> public void =
paintFigure(Graphics g)=20
{<BR> //g.drawImage(image, 0, =
0);<BR> g.drawLine(0, 0,=20
10, 10);<BR> super.paintFigure(g);<BR> } </FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>has no effect on the figure (no line =
is=20
drawn).</FONT></DIV></BLOCKQUOTE></BODY></HTML>
------=_NextPart_000_004F_01C5C356.E3C66140--
|
|
|
Powered by
FUDForum. Page generated in 0.04532 seconds