Package com.kitfox.svg.xml

Examples of com.kitfox.svg.xml.StyleAttribute


   
    protected void build() throws SVGException
    {
        super.build();
       
        StyleAttribute sty = new StyleAttribute();
       
        if (getPres(sty.setName("x1"))) x1 = sty.getFloatValueWithUnits();
       
        if (getPres(sty.setName("y1"))) y1 = sty.getFloatValueWithUnits();
       
        if (getPres(sty.setName("x2"))) x2 = sty.getFloatValueWithUnits();
       
        if (getPres(sty.setName("y2"))) y2 = sty.getFloatValueWithUnits();
    }
View Full Code Here


    {
//        if (trackManager.getNumTracks() == 0) return stopChange;
        boolean changeState = super.updateTime(curTime);

        //Get current values for parameters
        StyleAttribute sty = new StyleAttribute();
        boolean shapeChange = false;
       
        if (getPres(sty.setName("x1")))
        {
            float newVal = sty.getFloatValueWithUnits();
            if (newVal != x1)
            {
                x1 = newVal;
                shapeChange = true;
            }
        }

        if (getPres(sty.setName("y1")))
        {
            float newVal = sty.getFloatValueWithUnits();
            if (newVal != y1)
            {
                y1 = newVal;
                shapeChange = true;
            }
        }

        if (getPres(sty.setName("x2")))
        {
            float newVal = sty.getFloatValueWithUnits();
            if (newVal != x2)
            {
                x2 = newVal;
                shapeChange = true;
            }
        }

        if (getPres(sty.setName("y2")))
        {
            float newVal = sty.getFloatValueWithUnits();
            if (newVal != y2)
            {
                y2 = newVal;
                shapeChange = true;
            }
View Full Code Here

    }

    public void render(Graphics2D g) throws SVGException
    {
        //Don't process if not visible
        StyleAttribute styleAttrib = new StyleAttribute();
        if (getStyle(styleAttrib.setName("visibility")))
        {
            if (!styleAttrib.getStringValue().equals("visible")) return;
        }
       
        //Do not process offscreen groups
        boolean ignoreClip = diagram.ignoringClipHeuristic();
        if (!ignoreClip && outsideClip(g))
View Full Code Here

   
    protected void build() throws SVGException
    {
        super.build();
       
        StyleAttribute sty = new StyleAttribute();
       
        if (getPres(sty.setName("font-family"))) fontFamily = sty.getStringValue();
       
        if (getPres(sty.setName("units-per-em"))) unitsPerEm = sty.getIntValue();
        if (getPres(sty.setName("ascent"))) ascent = sty.getIntValue();
        if (getPres(sty.setName("descent"))) descent = sty.getIntValue();
        if (getPres(sty.setName("accent-height"))) accentHeight = sty.getIntValue();

        if (getPres(sty.setName("underline-position"))) underlinePosition = sty.getIntValue();
        if (getPres(sty.setName("underline-thickness"))) underlineThickness = sty.getIntValue();
        if (getPres(sty.setName("strikethrough-position"))) strikethroughPosition = sty.getIntValue();
        if (getPres(sty.setName("strikethrough-thickenss"))) strikethroughThickness = sty.getIntValue();
        if (getPres(sty.setName("overline-position"))) overlinePosition = sty.getIntValue();
        if (getPres(sty.setName("overline-thickness"))) overlineThickness = sty.getIntValue();
    }
View Full Code Here

   
    protected void build() throws SVGException
    {
        super.build();
       
        StyleAttribute sty = new StyleAttribute();
        String strn;
       
        if (getPres(sty.setName("x"))) x = sty.getFloatValueWithUnits();
       
        if (getPres(sty.setName("y"))) y = sty.getFloatValueWithUnits();
       
        if (getPres(sty.setName("z"))) z = sty.getFloatValueWithUnits();
    }
View Full Code Here

    public boolean updateTime(double curTime) throws SVGException
    {
//        if (trackManager.getNumTracks() == 0) return false;

        //Get current values for parameters
        StyleAttribute sty = new StyleAttribute();
        boolean stateChange = false;
       
        if (getPres(sty.setName("x")))
        {
            float newVal = sty.getFloatValueWithUnits();
            if (newVal != x)
            {
                x = newVal;
                stateChange = true;
            }
        }
       
        if (getPres(sty.setName("y")))
        {
            float newVal = sty.getFloatValueWithUnits();
            if (newVal != y)
            {
                y = newVal;
                stateChange = true;
            }
        }
       
        if (getPres(sty.setName("z")))
        {
            float newVal = sty.getFloatValueWithUnits();
            if (newVal != z)
            {
                z = newVal;
                stateChange = true;
            }
View Full Code Here

   
    protected void build() throws SVGException
    {
        super.build();
       
        StyleAttribute sty = new StyleAttribute();
        String strn;
       
        if (getPres(sty.setName("azimuth"))) azimuth = sty.getFloatValueWithUnits();
       
        if (getPres(sty.setName("elevation"))) elevation = sty.getFloatValueWithUnits();
    }
View Full Code Here

    public boolean updateTime(double curTime) throws SVGException
    {
//        if (trackManager.getNumTracks() == 0) return false;

        //Get current values for parameters
        StyleAttribute sty = new StyleAttribute();
        boolean stateChange = false;
       
        if (getPres(sty.setName("azimuth")))
        {
            float newVal = sty.getFloatValueWithUnits();
            if (newVal != azimuth)
            {
                azimuth = newVal;
                stateChange = true;
            }
        }
       
        if (getPres(sty.setName("elevation")))
        {
            float newVal = sty.getFloatValueWithUnits();
            if (newVal != elevation)
            {
                elevation = newVal;
                stateChange = true;
            }
View Full Code Here

   
    protected void build() throws SVGException
    {
        super.build();
       
        StyleAttribute sty = new StyleAttribute();
       
   
        String fillRuleStrn  = (getStyle(sty.setName("fill-rule"))) ? sty.getStringValue() : "nonzero";
        fillRule = fillRuleStrn.equals("evenodd") ? GeneralPath.WIND_EVEN_ODD : GeneralPath.WIND_NON_ZERO;
       
//        String d = "";
        if (getPres(sty.setName("d"))) d = sty.getStringValue();

//System.err.println(d);
       
        path = buildPath(d, fillRule);
       
View Full Code Here

    {
//        if (trackManager.getNumTracks() == 0) return false;
        boolean changeState = super.updateTime(curTime);

        //Get current values for parameters
        StyleAttribute sty = new StyleAttribute();
        boolean shapeChange = false;
       
        if (getStyle(sty.setName("fill-rule")))
        {
            int newVal = sty.getStringValue().equals("evenodd")
                ? GeneralPath.WIND_EVEN_ODD
                : GeneralPath.WIND_NON_ZERO;
            if (newVal != fillRule)
            {
                fillRule = newVal;
                changeState = true;
            }
        }
       
        if (getPres(sty.setName("d")))
        {
            String newVal = sty.getStringValue();
            if (!newVal.equals(d))
            {
                d = newVal;
                shapeChange = true;
            }
View Full Code Here

TOP

Related Classes of com.kitfox.svg.xml.StyleAttribute

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.