|
Re: [Draw2d] Can we draw a dot line in draw2d [message #169571 is a reply to message #169514] |
Thu, 24 February 2005 15:12 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
Originally posted by: none.us.ibm.com
SWT does not support this yet. The DOT style is 3 pixels long. If you
overlay two of them with XOR, you can get 1 pixel appearance.
"zbw" <zbw001091@yahoo.com.cn> wrote in message
news:cvjto0$h3v$1@www.eclipse.org...
> Hello all,
> My problem is: I want to draw a dot line with Draw2d.(It seems that I
> cannot upload a sample line jpeg file which is drawed by awt). I know
> there's a line type(LINE_DOT) in draw2d. But I feel the space between 2
> dots is too large(for example: . . . . . ), what I want is (.....). So can
> I draw it myself(not to use LINE_DOT type), and how to realize it?
>
> Thanks in advance
>
> BR,
> zbw
>
|
|
|
Re: [Draw2d] Can we draw a dot line in draw2d [message #169650 is a reply to message #169571] |
Fri, 25 February 2005 07:59 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
Originally posted by: 5d5.mail.ru
Randy Hudson wrote:
> SWT does not support this yet. The DOT style is 3 pixels long. If you
> overlay two of them with XOR, you can get 1 pixel appearance.
I think that it's possible since SWT 3.1m5; there is a new
SWT.LINE_CUSTOM style )))
>
> "zbw" <zbw001091@yahoo.com.cn> wrote in message
> news:cvjto0$h3v$1@www.eclipse.org...
>
>>Hello all,
>>My problem is: I want to draw a dot line with Draw2d.(It seems that I
>>cannot upload a sample line jpeg file which is drawed by awt). I know
>>there's a line type(LINE_DOT) in draw2d. But I feel the space between 2
>>dots is too large(for example: . . . . . ), what I want is (.....). So can
>>I draw it myself(not to use LINE_DOT type), and how to realize it?
>>
>>Thanks in advance
>>
>>BR,
>>zbw
>>
>
>
>
|
|
|
Re: [Draw2d] Can we draw a dot line in draw2d [message #169658 is a reply to message #169571] |
Fri, 25 February 2005 09:01 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) ![Go to next message Go to next message](theme/Solstice/images/down.png) |
zhangbw![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=zbw001091%40yahoo.com.cn) Messages: 26 Registered: July 2009 |
Junior Member |
|
|
Hi,Randy
I tried as your advice, but setXOR(true) seems not working the right way.
I use a Polyline, the following is my code:
public class myFigure extends Polyline
{
public myFigure()
{
super();
/**
* Polyline
*/
setLineStyle(Graphics.LINE_DOT);
setLineWidth(1);
Point point1 = new Point(0,100);
Point point2 = new Point(100,100);
setEndpoints(point1,point2);
setForegroundColor(ColorConstants.blue);
Polyline pl = new Polyline();
pl.setLineStyle(Graphics.LINE_DOT);
pl.setLineWidth(1);
pl.setEndpoints(new Point(1,100),new Point(101,100));
pl.setForegroundColor(ColorConstants.blue);
add(pl);
}
......
}
Then, In editpart:
myFigure figure = new myFigure();
figure.setXOR(true);
BUT the result is not what I want!
I don't think I'm right here, but I really don't know how to.
Can u please advice more or point out the wrong thing?
Thanks in advance
BR,
zbw
|
|
|
Re: [Draw2d] Can we draw a dot line in draw2d [message #170944 is a reply to message #169658] |
Tue, 08 March 2005 05:40 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) |
Pratik Shah![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=ppshah%40us.ibm.com) Messages: 1077 Registered: July 2009 |
Senior Member |
|
|
Look at GuideLineFigure. Also, make sure you don't run into these bugs:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=85876
"zbw" <zbw001091@yahoo.com.cn> wrote in message
news:cvmpgg$4tt$1@www.eclipse.org...
> Hi,Randy
> I tried as your advice, but setXOR(true) seems not working the right way.
> I use a Polyline, the following is my code:
>
> public class myFigure extends Polyline
> {
> public myFigure()
> {
> super();
> /**
> * Polyline
> */
> setLineStyle(Graphics.LINE_DOT);
> setLineWidth(1);
> Point point1 = new Point(0,100);
> Point point2 = new Point(100,100);
> setEndpoints(point1,point2);
> setForegroundColor(ColorConstants.blue);
>
> Polyline pl = new Polyline();
> pl.setLineStyle(Graphics.LINE_DOT);
> pl.setLineWidth(1);
> pl.setEndpoints(new Point(1,100),new Point(101,100));
> pl.setForegroundColor(ColorConstants.blue);
> add(pl);
> }
> ......
> }
>
> Then, In editpart:
>
> myFigure figure = new myFigure();
> figure.setXOR(true);
>
> BUT the result is not what I want!
> I don't think I'm right here, but I really don't know how to.
> Can u please advice more or point out the wrong thing?
>
> Thanks in advance
>
> BR,
> zbw
>
|
|
|
Powered by
FUDForum. Page generated in 0.03468 seconds