| 
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.paulhertz.aifile.ComponentVisitor
net.paulhertz.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 net.paulhertz.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 ComponentVisitorcomp - a BezShape instancepublic void setColors(PApplet host)
public boolean hasFill()
hasFill in interface ColorableINFpublic 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 ColorableINFpublic boolean hasStroke()
hasStroke in interface ColorableINFpublic 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 ColorableINFpublic int fillColor()
fillColor in interface ColorableINFpublic void setFillColor(int newFillColor)
ColorableINF
setFillColor in interface ColorableINFnewFillColor - a Processing color (32-bit int with ARGB bytes).public int strokeColor()
strokeColor in interface ColorableINFpublic void setStrokeColor(int newStrokeColor)
ColorableINF
setStrokeColor in interface ColorableINFnewStrokeColor - a Processing color (32-bit int with ARGB bytes).public void setFillOpacity(int opacity)
setFillOpacity in interface ColorableINFopacity - a number in the range 0..255. Value is not checked!public int fillOpacity()
fillOpacity in interface ColorableINFpublic void setStrokeOpacity(int opacity)
setStrokeOpacity in interface ColorableINFopacity - a number in the range 0..255. Value is not checked!public int strokeOpacity()
strokeOpacity in interface ColorableINFpublic float weight()
weight in interface ColorableINFpublic void setWeight(float newWeight)
setWeight in interface ColorableINFnewWeight - the new weight of stroked lines.
  | 
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||