Package com.kitfox.svg.xml

Examples of com.kitfox.svg.xml.StyleAttribute


    {
//        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;
                shapeChange = true;
            }
        }
       
        if (getPres(sty.setName("points")))
        {
            String newVal = sty.getStringValue();
            if (!newVal.equals(pointsStrn))
            {
                pointsStrn = newVal;
                shapeChange = true;
            }
View Full Code Here


   
    protected void build() throws SVGException
    {
        super.build();
       
        StyleAttribute sty = new StyleAttribute();
       
        if (getPres(sty.setName("cx"))) cx = sty.getFloatValueWithUnits();
       
        if (getPres(sty.setName("cy"))) cy = sty.getFloatValueWithUnits();
       
        if (getPres(sty.setName("rx"))) rx = sty.getFloatValueWithUnits();
       
        if (getPres(sty.setName("ry"))) ry = sty.getFloatValueWithUnits();
       
        ellipse.setFrame(cx - rx, cy - ry, rx * 2f, ry * 2f);
    }
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 (getPres(sty.setName("cx")))
        {
            float newCx = sty.getFloatValueWithUnits();
            if (newCx != cx)
            {
                cx = newCx;
                shapeChange = true;
            }
        }
       
        if (getPres(sty.setName("cy")))
        {
            float newCy = sty.getFloatValueWithUnits();
            if (newCy != cy)
            {
                cy = newCy;
                shapeChange = true;
            }
        }
       
        if (getPres(sty.setName("rx")))
        {
            float newRx = sty.getFloatValueWithUnits();
            if (newRx != rx)
            {
                rx = newRx;
                shapeChange = true;
            }
        }
       
        if (getPres(sty.setName("ry")))
        {
            float newRy = sty.getFloatValueWithUnits();
            if (newRy != ry)
            {
                ry = newRy;
                shapeChange = true;
            }
View Full Code Here

   
    protected void build() throws SVGException
    {
        super.build();
       
        StyleAttribute sty = new StyleAttribute();
       
        if (getPres(sty.setName("cx"))) cx = sty.getFloatValueWithUnits();
       
        if (getPres(sty.setName("cy"))) cy = sty.getFloatValueWithUnits();
       
        if (getPres(sty.setName("fx"))) fx = sty.getFloatValueWithUnits();
       
        if (getPres(sty.setName("fy"))) fy = sty.getFloatValueWithUnits();
       
        if (getPres(sty.setName("r"))) r = sty.getFloatValueWithUnits();
    }
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 (getPres(sty.setName("cx")))
        {
            float newVal = sty.getFloatValueWithUnits();
            if (newVal != cx)
            {
                cx = newVal;
                shapeChange = true;
            }
        }
       
        if (getPres(sty.setName("cy")))
        {
            float newVal = sty.getFloatValueWithUnits();
            if (newVal != cy)
            {
                cy = newVal;
                shapeChange = true;
            }
        }
       
        if (getPres(sty.setName("fx")))
        {
            float newVal = sty.getFloatValueWithUnits();
            if (newVal != fx)
            {
                fx = newVal;
                shapeChange = true;
            }
        }
       
        if (getPres(sty.setName("fy")))
        {
            float newVal = sty.getFloatValueWithUnits();
            if (newVal != fy)
            {
                fy = newVal;
                shapeChange = true;
            }
        }
       
        if (getPres(sty.setName("r")))
        {
            float newVal = sty.getFloatValueWithUnits();
            if (newVal != r)
            {
                r = newVal;
                shapeChange = true;
            }
View Full Code Here

   
    protected void build() throws SVGException
    {
        super.build();
       
        StyleAttribute sty = new StyleAttribute();
       
        if (getPres(sty.setName("offset")))
        {
            offset = sty.getFloatValue();
            String units = sty.getUnits();
            if (units != null && units.equals("%")) offset /= 100f;
            if (offset > 1) offset = 1;
            if (offset < 0) offset = 0;
        }
       
        if (getStyle(sty.setName("stop-color"))) color = sty.getColorValue();

        if (getStyle(sty.setName("stop-opacity"))) opacity = sty.getRatioValue();
    }
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 shapeChange = false;
       
        if (getPres(sty.setName("offset")))
        {
            float newVal = sty.getFloatValue();
            if (newVal != offset)
            {
                offset = newVal;
                shapeChange = true;
            }
        }
       
        if (getPres(sty.setName("stop-color")))
        {
            Color newVal = sty.getColorValue();
            if (newVal != color)
            {
                color = newVal;
                shapeChange = true;
            }
        }
       
        if (getPres(sty.setName("stop-opacity")))
        {
            float newVal = sty.getFloatValue();
            if (newVal != opacity)
            {
                opacity = newVal;
                shapeChange = true;
            }
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();
        if (getPres(sty.setName("pointsAtX"))) pointsAtX = sty.getFloatValueWithUnits();
        if (getPres(sty.setName("pointsAtY"))) pointsAtY = sty.getFloatValueWithUnits();
        if (getPres(sty.setName("pointsAtZ"))) pointsAtZ = sty.getFloatValueWithUnits();
        if (getPres(sty.setName("specularComponent"))) specularComponent = sty.getFloatValueWithUnits();
        if (getPres(sty.setName("limitingConeAngle"))) limitingConeAngle = 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;
            }
        }
       
        if (getPres(sty.setName("pointsAtX")))
        {
            float newVal = sty.getFloatValueWithUnits();
            if (newVal != pointsAtX)
            {
                pointsAtX = newVal;
                stateChange = true;
            }
        }
       
        if (getPres(sty.setName("pointsAtY")))
        {
            float newVal = sty.getFloatValueWithUnits();
            if (newVal != pointsAtY)
            {
                pointsAtY = newVal;
                stateChange = true;
            }
        }
       
        if (getPres(sty.setName("pointsAtZ")))
        {
            float newVal = sty.getFloatValueWithUnits();
            if (newVal != pointsAtZ)
            {
                pointsAtZ = newVal;
                stateChange = true;
            }
        }
       
        if (getPres(sty.setName("specularComponent")))
        {
            float newVal = sty.getFloatValueWithUnits();
            if (newVal != specularComponent)
            {
                specularComponent = newVal;
                stateChange = true;
            }
        }
       
        if (getPres(sty.setName("limitingConeAngle")))
        {
            float newVal = sty.getFloatValueWithUnits();
            if (newVal != limitingConeAngle)
            {
                limitingConeAngle = newVal;
                stateChange = true;
            }
View Full Code Here

   
    protected void build() throws SVGException
    {
        super.build();
       
        StyleAttribute sty = new StyleAttribute();
        String strn;
        /*
        if (getPres(sty.setName("filterUnits")))
        {
            strn = sty.getStringValue().toLowerCase();
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.