I have drawn one rectangle by using RectangleFigure
in draw2d. And I am able to
color the rectangle figure by calling rectangleFigure.setBackgroundColor
.
Now the same way I want to color the Image also. For that I used ImageFigure
in
draw2d and I gave the background color by calling ImageFigure.setBackgroundColor()
.
But it does not give any color for me. So How can I give the background color
to the image figure in draw2d?
Asked
Active
Viewed 1,157 times
1

Favonius
- 13,959
- 3
- 55
- 95

user414967
- 5,225
- 10
- 40
- 61
1 Answers
5
RectangleFigure extends Shape which draws it's own background by default. ImageFigure directly extends Figure which will only draw the background if you set it as Opaque:
imageFigure.setOpaque(true);

Nick Wilson
- 4,959
- 29
- 42