Documentation of 'org.jhotdraw.samples.svg.SVGAttributeKeys' Java class
SVGAttributeKeys
org.jhotdraw.samples.svg

Class SVGAttributeKeys



  • public class SVGAttributeKeys
    extends AttributeKeys
    SVGAttributeKeys.
    • Field Detail

      • TITLE

        public static final AttributeKey<java.lang.String> TITLE
        Specifies the title of an SVG drawing. This attribute can be null, to indicate that the drawing has no title.
      • DESCRIPTION

        public static final AttributeKey<java.lang.String> DESCRIPTION
        Specifies the description of an SVG drawing. This attribute can be null, to indicate that the drawing has no description.
      • VIEWPORT_FILL

        public static final AttributeKey<java.awt.Color> VIEWPORT_FILL
        Specifies the viewport-fill of an SVG viewport. This attribute can be null, to indicate that the viewport has no viewport-fill.
      • VIEWPORT_FILL_OPACITY

        public static final AttributeKey<java.lang.Double> VIEWPORT_FILL_OPACITY
        Specifies the viewport-fill-opacity of an SVG viewport.
      • VIEWPORT_WIDTH

        public static final AttributeKey<java.lang.Double> VIEWPORT_WIDTH
        Specifies the width of an SVG viewport.
      • VIEWPORT_HEIGHT

        public static final AttributeKey<java.lang.Double> VIEWPORT_HEIGHT
        Specifies the height of an SVG viewport.
      • FILL_GRADIENT

        public static final AttributeKey<Gradient> FILL_GRADIENT
        Specifies the fill gradient of a SVG figure.
      • FILL_OPACITY

        public static final AttributeKey<java.lang.Double> FILL_OPACITY
        Specifies the fill opacity of a SVG figure. This is a value between 0 and 1 whereas 0 is translucent and 1 is fully opaque.
      • OPACITY

        public static final AttributeKey<java.lang.Double> OPACITY
        Specifies the overall opacity of a SVG figure. This is a value between 0 and 1 whereas 0 is translucent and 1 is fully opaque.
      • STROKE_GRADIENT

        public static final AttributeKey<Gradient> STROKE_GRADIENT
        Specifies the stroke gradient of a SVG figure.
      • STROKE_OPACITY

        public static final AttributeKey<java.lang.Double> STROKE_OPACITY
        Specifies the stroke opacity of a SVG figure. This is a value between 0 and 1 whereas 0 is translucent and 1 is fully opaque.
      • LINK

        public static final AttributeKey<java.lang.String> LINK
        Specifies a link. In an SVG file, the link is stored in a "a" element which encloses the figure. http://www.w3.org/TR/SVGMobile12/linking.html#AElement
      • LINK_TARGET

        public static final AttributeKey<java.lang.String> LINK_TARGET
        Specifies a link target. In an SVG file, the link is stored in a "a" element which encloses the figure. http://www.w3.org/TR/SVGMobile12/linking.html#AElement
    • Constructor Detail

      • SVGAttributeKeys

        public SVGAttributeKeys()
    • Method Detail

      • getFillPaint

        @Nullable
        public static java.awt.Paint getFillPaint(Figure f)
        Gets the fill paint for the specified figure based on the attributes FILL_GRADIENT, FILL_OPACITY, FILL_PAINT and the bounds of the figure. Returns null if the figure is not filled.
      • getStrokePaint

        @Nullable
        public static java.awt.Paint getStrokePaint(Figure f)
        Gets the stroke paint for the specified figure based on the attributes STROKE_GRADIENT, STROKE_OPACITY, STROKE_PAINT and the bounds of the figure. Returns null if the figure is not filled.
      • setDefaults

        public static void setDefaults(Figure f)
        Sets SVG default values.
      • getPerpendicularHitGrowth

        public static double getPerpendicularHitGrowth(Figure f)
        Returns the distance, that a Rectangle needs to grow (or shrink) to make hit detections on a shape as specified by the FILL_UNDER_STROKE and STROKE_POSITION attributes of a figure. The value returned is the number of units that need to be grown (or shrunk) perpendicular to a stroke on an outline of the shape.

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.