java graphics - a shape with two colours -
(This is Java) I have an oval, which represents an entity. If I want the color of oval to represent the health of the unit, then a perfectly healthy unit will be all green and the oval starts red color with the health of the decreasing unit. Therefore, 50% of the oval on health will be in the bottom half and red in the top half in green, and completely red when dead of the unit. I'm sure the solution here should be clear and trivial, but I can not see it. Thank you very much
You can draw a red oval in the background, then an oval and a rectangle, Where the rectangle starts under the oval, then the bottom of the bottom increases upward to reveal the red oval.
You can read how to create complex shapes of ancient shapes
Comments
Post a Comment