Package com.adobe.fxg

Examples of com.adobe.fxg.FXGVersion


    {
      double width = node.width;
      double height = node.height;
      boolean repeat = node.repeat;
      FillMode fillMode = node.fillMode;
      FXGVersion fileVersion = node.getFileVersion();

        // Use default width/height information if none specified
        if (Double.isNaN(width))
            width = tag.width;

        if (Double.isNaN(height))
            height = tag.height;

        // Create Fill Style
        Matrix matrix = new Matrix();
        matrix.scaleX = (int)(SwfConstants.TWIPS_PER_PIXEL * SwfConstants.FIXED_POINT_MULTIPLE);
        matrix.scaleY = (int)(SwfConstants.TWIPS_PER_PIXEL * SwfConstants.FIXED_POINT_MULTIPLE);
        matrix.hasScale = true; // Apply runtime scale of 20x for twips
       
        FillStyle fs = null;
        if (fileVersion.equalTo(FXGVersion.v1_0))
        {
          if (repeat)
            fs = new FillStyle(FillStyle.FILL_BITS, matrix, tag);
          else
            fs = new FillStyle(FillStyle.FILL_BITS | FillStyle.FILL_BITS_CLIP, matrix, tag);
View Full Code Here


            double version = 1.0;

            if (rootNode instanceof FlexGraphicNode)
            {
                FlexGraphicNode graphicNode = (FlexGraphicNode)rootNode;
                FXGVersion v = graphicNode.getVersion();
                version = v != null ? v.asDouble() : 1.0;
                hasTextGraphic = graphicNode.hasText;
                baseClassName = graphicNode.baseClassName;
            }

            try
View Full Code Here

            FXGVersionHandler obj)
    {
        if (versionHandlers != null)
        {
            FXGVersionHandler vHandler = versionHandlers.get(version);
            FXGVersion fxgVersion = (vHandler != null) ? vHandler.getVersion() : version;
            versionHandlers.put(fxgVersion, obj);
        }
    }
View Full Code Here

        if (versionHandlers != null)
        {
            FXGVersionHandler vHandler = versionHandlers.get(version);
            if (vHandler != null)
            {
                FXGVersion fxgVersion = vHandler.getVersion();
                versionHandlers.remove(fxgVersion);
            }
        }
    }
View Full Code Here

        // look for exact matches on the version
        Iterator<FXGVersion> iter = versions.iterator();
        while (iter.hasNext())
        {
            FXGVersion version = iter.next();
            if (version.equalTo(fxgVersion))
                return versionHandlers.get(version);
        }

        // look for matches based on matching major version
        iter = versions.iterator();
        while (iter.hasNext())
        {
            FXGVersion version = iter.next();
            if (version.getMajorVersion() == fxgVersion.getMajorVersion())
                return versionHandlers.get(version);
        }

        return null;
View Full Code Here

     * @param version - version as a double
     * @return
     */
    protected static FXGVersionHandler getVersionHandler(double version)
    {
        FXGVersion fxgVersion = FXGVersion.newInstance(version);
        return getVersionHandler(fxgVersion);
    }
View Full Code Here

            return null;
        Set<FXGVersion> versions = getVersionsForRegisteredHandlers();

        // look for exact matches on the version
        Iterator<FXGVersion> iter = versions.iterator();
        FXGVersion latest = null;
        while (iter.hasNext())
        {
            FXGVersion version = iter.next();
            if (latest == null)
            {
                latest = version;
            }
            else
            {
                if (version.greaterThan(latest))
                    latest = version;
            }
        }
        return versionHandlers.get(latest);
    }
View Full Code Here

            double version = 1.0;

            if (rootNode instanceof FlexGraphicNode)
            {
                FlexGraphicNode graphicNode = (FlexGraphicNode)rootNode;
                FXGVersion v = graphicNode.getVersion();
                version = v != null ? v.asDouble() : 1.0;
                hasTextGraphic = graphicNode.hasText;
            }

            try
            {
View Full Code Here

TOP

Related Classes of com.adobe.fxg.FXGVersion

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.