A begginner

76 views
Skip to first unread message

waXim Shigri

unread,
Oct 23, 2013, 1:13:08 AM10/23/13
to vectoroi...@googlegroups.com
Hey..I want to draw a drawing android app..so i need to draw shapes and then fill with colorss... Can u help me how to use vectroid library to fulfill my requirements.. thanks

siliconeagle

unread,
Oct 23, 2013, 6:17:26 PM10/23/13
to vectoroi...@googlegroups.com
hi,

Yes, you are right, i should make an example for that.

Drawing d = new Drawing();
d.size=new PointF(720,1200);
Stroke _imageRect = new Stroke(true);
_imageRect.pen=new Pen();
_imageRect.fill=new Fill();
_imageRect.fill.type=Fill.Type.COLOR;
_imageRect.fill.setColor(Color.RED);
float top = 100;
float left =100;
float w = 200;
float h = 300;
StrokeUtil.makeRect(_imageRect,new RectF(top,left,top+h,left+w) );

d.elements.add(_imageRect);
d.update(true, _displayView.getRenderer(), UpdateFlags.ALL);

I haven't tested it but it should work...

in StrokeUtil there are functions to make shapes. And just add PointF's to the Stroke.elements vector.

best
rob

siliconeagle

unread,
Oct 23, 2013, 6:18:58 PM10/23/13
to vectoroi...@googlegroups.com
you can post up errors you get and I'll take a look ;)

best
rob

waXim Shigri

unread,
Oct 24, 2013, 3:43:07 AM10/24/13
to vectoroi...@googlegroups.com
thankx for the help..

//StrokeUtil.makeRect(_imageRect,new RectF(top,left,top+h,left+w) );
StrokeUtil.genRect(_imageRect,new RectF(top,left,top+h,left+w) );

The above Commented line was that u mailed..but StrokeUtil.makeRect() does not exist..so i changed it to StrokUtil.genRect().. 
But the problem is that genRect() gets the parameters genRect(PointVec curVec,RectF r).. but in ur mailed lines..genRect(Stroke, RectF) i being passed..

So it is giving error..

waXim Shigri

unread,
Oct 24, 2013, 3:58:51 AM10/24/13
to vectoroi...@googlegroups.com
Sir.. can u post a complete code to just draw a rectangle and show on the secreen... i m just the begginner...will be very helpful to me for my drawing application..>>


On Thursday, 24 October 2013 03:18:58 UTC+5, siliconeagle wrote:
Reply all
Reply to author
Forward
0 new messages