Examples of FXGVersion


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

Examples of com.adobe.fxg.FXGVersion

            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

Examples of com.adobe.fxg.FXGVersion

            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

Examples of com.adobe.fxg.FXGVersion

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

Examples of com.adobe.fxg.FXGVersion

        // 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

Examples of com.adobe.fxg.FXGVersion

     * @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

Examples of com.adobe.fxg.FXGVersion

            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

Examples of com.adobe.fxg.FXGVersion

            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

Examples of org.apache.flex.compiler.fxg.FXGVersion

     * @param problems problem collection used to collect problems occurred within this method
     * @return the matching BlendMode
     */
    protected BlendMode parseBlendMode(String value, BlendMode defMode, Collection<ICompilerProblem> problems)
    {
        FXGVersion fileVersion = ((GraphicNode)(this.getDocumentNode())).getVersion();
       
        if (FXG_BLENDMODE_ADD_VALUE.equals(value))
        {
            return BlendMode.ADD;
        }
        else if (FXG_BLENDMODE_ALPHA_VALUE.equals(value))
        {
            return BlendMode.ALPHA;
        }
        else if (FXG_BLENDMODE_DARKEN_VALUE.equals(value))
        {
            return BlendMode.DARKEN;
        }
        else if (FXG_BLENDMODE_DIFFERENCE_VALUE.equals(value))
        {
            return BlendMode.DIFFERENCE;
        }
        else if (FXG_BLENDMODE_ERASE_VALUE.equals(value))
        {
            return BlendMode.ERASE;
        }
        else if (FXG_BLENDMODE_HARDLIGHT_VALUE.equals(value))
        {
            return BlendMode.HARDLIGHT;
        }
        else if (FXG_BLENDMODE_INVERT_VALUE.equals(value))
        {
            return BlendMode.INVERT;
        }
        else if (FXG_BLENDMODE_LAYER_VALUE.equals(value))
        {
            return BlendMode.LAYER;
        }
        else if (FXG_BLENDMODE_LIGHTEN_VALUE.equals(value))
        {
            return BlendMode.LIGHTEN;
        }
        else if (FXG_BLENDMODE_MULTIPLY_VALUE.equals(value))
        {
            return BlendMode.MULTIPLY;
        }
        else if (FXG_BLENDMODE_NORMAL_VALUE.equals(value))
        {
            return BlendMode.NORMAL;
        }
        else if (FXG_BLENDMODE_OVERLAY_VALUE.equals(value))
        {
            return BlendMode.OVERLAY;
        }
        else if (FXG_BLENDMODE_SCREEN_VALUE.equals(value))
        {
            return BlendMode.SCREEN;
        }
        else if (FXG_BLENDMODE_SUBTRACT_VALUE.equals(value))
        {
            return BlendMode.SUBTRACT;
        }
        else if (fileVersion.equalTo(FXGVersion.v1_0))
        {
            // Rest of the blend modes are unknown for FXG 1.0
            //Unknown blend mode: {0}.
            problems.add(new FXGUnknownAttributeValueProblem(getDocumentPath(),
                    getStartLine(), getStartColumn(), FXG_BLENDMODE_ATTRIBUTE, value));
View Full Code Here

Examples of org.apache.flex.compiler.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 = image.getWidth();

        if (Double.isNaN(height))
            height = image.getHeight();

        // Create Fill Style
        Matrix matrix = new Matrix();
        double twx = (ISWFConstants.TWIPS_PER_PIXEL);
        matrix.setScale(twx, twx);
       
        FillStyle fs = null;
        if (fileVersion.equalTo(FXGVersion.v1_0))
        {
          if (repeat)
            fs = new FillStyle(FillStyle.REPEATING_BITMAP_FILL, matrix, image.getTag());
          else
            fs = new FillStyle(FillStyle.CLIPPED_BITMAP_FILL, matrix, image.getTag());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.