API V2.1

repast.simphony.relogo.ide.image
[Java] Class NLCirclePrimitive

java.lang.Object
  repast.simphony.relogo.image.NLImagePrimitive
      repast.simphony.relogo.ide.image.NLCirclePrimitive

public class NLCirclePrimitive
extends NLImagePrimitive

Authors:
CBURKE


Field Summary
 
Fields inherited from class NLImagePrimitive
changingColor, color, fill
 
Constructor Summary
NLCirclePrimitive(int c, boolean f, boolean change, Point ul, int d)

Creates a new instance of NLCirclePrimitive

 
Method Summary
Shape reLogoShape(Rectangle bb)

Generate a shape representation of this image, appropriate for ReLogo, in the specified rectangle.

void render(Graphics gc, Rectangle bb, Color clr)

Render the primitive into the specified graphics context at the specified scale.

String renderingCode(Rectangle bb)

Generate code to render this image in the specified rectangle.

Shape renderingShape(Rectangle bb)

Generate a shape representation of this image in the specified rectangle.

 
Methods inherited from class NLImagePrimitive
getColor, isChangingColor, reLogoShape, render, renderingCode, renderingShape
 

Constructor Detail

NLCirclePrimitive

public NLCirclePrimitive(int c, boolean f, boolean change, Point ul, int d)
Creates a new instance of NLCirclePrimitive


 
Method Detail

reLogoShape

public Shape reLogoShape(Rectangle bb)
Generate a shape representation of this image, appropriate for ReLogo, in the specified rectangle. Depending on the value of the fill attribute, this is either an Arc2D or an Ellipse2D.


render

public void render(Graphics gc, Rectangle bb, Color clr)
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.
Parameters:
gc - Graphics context in which to render the primitive
bb - Bounding box to which the primitive should be scaled.


renderingCode

public String renderingCode(Rectangle bb)
Generate code to render this image in the specified rectangle. Assumes the presence of a color object stack, given RGB24.


renderingShape

public Shape renderingShape(Rectangle bb)
Generate a shape representation of this image in the specified rectangle. Depending on the value of the fill attribute, this is either an Arc2D or an Ellipse2D.


 

ReLogo API V2.1