how to draw a image inside Rectangular Figure in GEF editor

98 views Asked by At

I have drawn one rectangle by using RectangleFigure in draw2d. Am able to setBackgroundColor,setForegroundColor....How i need to draw a image inside RectangleFigure.

Thanks in Advance.

1

There are 1 answers

0
Shashwat On

Extend your figure from org.eclipse.draw2d.ImageFigure class.

In constructor you can pass org.eclipse.swt.graphics.Image which can be passed to super class.