|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ignotus.aifile.ComponentVisitor
com.ignotus.aifile.ShapeAttributeVisitor
public class ShapeAttributeVisitor
Method Summary | |
---|---|
int |
fillColor()
|
int |
fillOpacity()
|
boolean |
hasFill()
|
boolean |
hasStroke()
|
static ShapeAttributeVisitor |
makeCurrentStateVisitor(PApplet parent)
|
static ShapeAttributeVisitor |
makeFilledShapeVisitor(int fillColor)
|
static ShapeAttributeVisitor |
makeFilledStrokedShapeVisitor(int fillColor,
int strokeColor,
int weight)
|
static ShapeAttributeVisitor |
makeStrokedShapeVisitor(int strokeColor,
int weight)
|
void |
setColors(PApplet host)
Sets fill and stroke using the current graphics state. |
void |
setFillColor(int newFillColor)
Sets the current fill color. |
void |
setFillOpacity(int opacity)
Sets opacity of current fill color. |
void |
setHasFill(boolean newHasFill)
|
void |
setHasStroke(boolean newHasStroke)
|
void |
setNoFill()
Equivalent to setHasFill(false). |
void |
setNoStroke()
Equivalent to setHasStroke(false). |
void |
setStrokeColor(int newStrokeColor)
Sets the current stroke color. |
void |
setStrokeOpacity(int opacity)
Sets opacity of current stroke color. |
void |
setWeight(float newWeight)
|
int |
strokeColor()
|
int |
strokeOpacity()
|
void |
visitBezShape(BezShape comp)
visits a BezShape node |
float |
weight()
Returns the current weight (in points) of stroked lines. |
Methods inherited from class com.ignotus.aifile.ComponentVisitor |
---|
visitCustomComponent, visitDocumentComponent, visitGroupComponent, visitLayerComponent, visitPointText |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static ShapeAttributeVisitor makeCurrentStateVisitor(PApplet parent)
public static ShapeAttributeVisitor makeFilledShapeVisitor(int fillColor)
public static ShapeAttributeVisitor makeStrokedShapeVisitor(int strokeColor, int weight)
public static ShapeAttributeVisitor makeFilledStrokedShapeVisitor(int fillColor, int strokeColor, int weight)
public void visitBezShape(BezShape comp)
visitBezShape
in class ComponentVisitor
comp
- a BezShape instancepublic void setColors(PApplet host)
public boolean hasFill()
hasFill
in interface ColorableINF
public void setHasFill(boolean newHasFill)
newHasFill
- pass true if this shape has a fill, false otherwise. Note that
the current fillColor will not be discarded by setting hasFill to false: the shape
simply won't display or save to file with a fill.public void setNoFill()
setNoFill
in interface ColorableINF
public boolean hasStroke()
hasStroke
in interface ColorableINF
public void setHasStroke(boolean newHasStroke)
newHasStroke
- pass true if this shape has a stroke, false otherwise. Note that
the current strokeColor will not be discarded by setting hasStroke to false: the shape
simply won't display or save to file with a stroke.public void setNoStroke()
setNoStroke
in interface ColorableINF
public int fillColor()
fillColor
in interface ColorableINF
public void setFillColor(int newFillColor)
ColorableINF
setFillColor
in interface ColorableINF
newFillColor
- a Processing color (32-bit int with ARGB bytes).public int strokeColor()
strokeColor
in interface ColorableINF
public void setStrokeColor(int newStrokeColor)
ColorableINF
setStrokeColor
in interface ColorableINF
newStrokeColor
- a Processing color (32-bit int with ARGB bytes).public void setFillOpacity(int opacity)
setFillOpacity
in interface ColorableINF
opacity
- a number in the range 0..255. Value is not checked!public int fillOpacity()
fillOpacity
in interface ColorableINF
public void setStrokeOpacity(int opacity)
setStrokeOpacity
in interface ColorableINF
opacity
- a number in the range 0..255. Value is not checked!public int strokeOpacity()
strokeOpacity
in interface ColorableINF
public float weight()
weight
in interface ColorableINF
public void setWeight(float newWeight)
setWeight
in interface ColorableINF
newWeight
- the new weight of stroked lines.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |