Yes, you are right, i should make an example for that.
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