public class NLImage
Constructor and description |
---|
NLImage
(String n, boolean rot, int cc, List<NLImagePrimitive> prims) Creates a new instance of NLImage |
Type Params | Return Type | Name and description |
---|---|---|
|
int |
compareTo(Object o) |
|
String |
getName() Getter method for preferred name for this drawing. |
|
List<NLImagePrimitive> |
getPrimitives() |
|
boolean |
isRotates() @return the rotates |
|
void |
render(Graphics gc, Rectangle rect, Color color) Render the primitive into the specified graphics context at the specified scale. |
|
void |
render(Graphics gc, Rectangle rect, double rotation, Color color) Render the primitive into the specified graphics context at the specified scale. |
|
String |
renderingCode(Rectangle rect) Generate code to render this image in the specified rectangle. |
|
String |
toString() |
Creates a new instance of NLImage
Getter method for preferred name for this drawing.
Render the primitive into the specified graphics context at the specified scale. The primitive's notional size (300x300) should be mapped to the specified dimensions. There is no guarantee that the specified bounds cover the rendering surface, although that is the assumption in Netlogo.
gc
- Graphics context in which to render the primitivebb
- Bounding box to which the primitive should be scaled.Render the primitive into the specified graphics context at the specified scale. The primitive's notional size (300x300) should be mapped to the specified dimensions. There is no guarantee that the specified bounds cover the rendering surface, although that is the assumption in Netlogo. This version rotates the resulting shape as a whole
gc
- Graphics context in which to render the primitivebb
- Bounding box to which the primitive should be scaled.Generate code to render this image in the specified rectangle. The returned string is not a complete statement; it needs to be embedded as an expression within some other statement. The value created is a new NLIcon.