Examples of MaskingNode


Examples of com.adobe.internal.fxg.dom.MaskingNode

    protected PlaceObject mask(MaskableNode node, DefineSprite parentSprite)
    {
        PlaceObject po3 = null;

        MaskingNode mask = node.getMask();
        if (mask instanceof GroupNode)
        {
            // According to FXG Spec.: The masking element inherits the target
            // group's coordinate space, as though it were a direct child
            // element. In the case when mask is inside a shape, it doesn't
View Full Code Here

Examples of com.adobe.internal.fxg.dom.MaskingNode

     * @param parentSprite - the SWF DefineSprite that will be the parent of
     * this node when added to the display list
     */
    protected PlaceObject mask(MaskableNode node, DefineSprite parentSprite)
    {
        MaskingNode mask = node.getMask();
        PlaceObject po3 = super.mask(node, parentSprite);

        if (mask != null)
        {
            MaskType maskType = node.getMaskType();

            if (maskType != MaskType.CLIP)
            {
                // Record the display list position that the mask was placed.
                // The ActionScript display list is 0 based, but SWF the depth
                // counter starts at 1, so we subtract 1.
                int maskIndex = parentSprite.depthCounter - 1;
                mask.setMaskIndex(maskIndex);
            }

            if (maskType == MaskType.LUMINOSITY)
            {
                // Create a new SymbolClass to map to this mask's
View Full Code Here

Examples of com.adobe.internal.fxg.dom.MaskingNode

     * @param symbolClassType - determines the base type for the SymbolClass
     */
    private void advancedGraphics(GraphicContentNode node, DefineTag symbol,
            SymbolClassType symbolClassType)
    {
        MaskingNode maskNode = node.getMask();

        // Create a new SymbolClass to map to this mask's
        // DefineSprite (see below)
        String className = graphicClass.getClassName();
        if (maskNode != null)
            className += "_Maskee";

        className = createUniqueName(className);

        FXGSymbolClass symbolClass = new FXGSymbolClass();
        symbolClass.setPackageName(packageName);
        symbolClass.setClassName(className);

        // Then record this SymbolClass with the top-level graphic
        // SymbolClass so that it will be associated with the FXG asset.
        graphicClass.addAdditionalSymbolClass(symbolClass);

        StringBuilder buf = new StringBuilder(512);
        buf.append("package ").append(packageName).append("\n");
        buf.append("{\n\n");

        // Determine Base Class
        String baseClassName = null;
        if (symbolClassType == SymbolClassType.SPRITE)
        {
            buf.append("import flash.display.Sprite;\n");
            baseClassName = "Sprite";
        }
        else
        {
            buf.append("import flash.display.Shape;\n");
            baseClassName = "Shape";
        }

        // Advanced BlendModes
        String blendModeImport = generateBlendModeImport(node.blendMode);
        if (blendModeImport != null)
            buf.append(blendModeImport);
        String blendModeShader = generateBlendMode(node.blendMode);

        // Class Definition and Constructor
        buf.append("public class ").append(className).append(" extends ").append(baseClassName).append("\n");
        buf.append("{\n");
        buf.append("    public function ").append(className).append("()\n");
        buf.append("    {\n");
        buf.append("        super();\n");
        buf.append("        this.cacheAsBitmap = true;\n");

        // Alpha and Luminosity Masks
        if (maskNode != null)
        {
            int maskIndex = maskNode.getMaskIndex();
            if (symbolClassType == SymbolClassType.SPRITE)
                buf.append("        this.mask = this.getChildAt(").append(maskIndex).append(");\n");
            else
                buf.append("        this.mask = this.parent.getChildAt(").append(maskIndex).append(");\n");
        }
View Full Code Here

Examples of com.adobe.internal.fxg.dom.MaskingNode

            if (hasAdvancedGraphics(node))
                buf.append("        this.cacheAsBitmap = true;\n");

            // Alpha Masks
            MaskingNode maskNode = node.getMask();
            if (maskNode != null &&
                    (node.getMaskType() == MaskType.ALPHA ||
                     node.getMaskType() == MaskType.LUMINOSITY))
            {
                int maskIndex = maskNode.getMaskIndex();
                buf.append("        this.mask = this.parent.getChildAt(").append(maskIndex).append(");\n");
            }

            // BlendMode Shader
            if (blendModeShader != null)
View Full Code Here

Examples of com.adobe.internal.fxg.dom.MaskingNode

     * @param parentSprite - the SWF DefineSprite that will be the parent of
     * this node when added to the display list
     */
    protected PlaceObject mask(MaskableNode node, DefineSprite parentSprite)
    {
        MaskingNode mask = node.getMask();
        PlaceObject po3 = super.mask(node, parentSprite);

        if (mask != null)
        {
            MaskType maskType = node.getMaskType();

            if (maskType != MaskType.CLIP)
            {
                // Record the display list position that the mask was placed.
                // The ActionScript display list is 0 based, but SWF the depth
                // counter starts at 1, so we subtract 1.
                int maskIndex = parentSprite.depthCounter - 1;
                mask.setMaskIndex(maskIndex);
            }

            if (maskType == MaskType.LUMINOSITY)
            {
                // Create a new SymbolClass to map to this mask's
View Full Code Here

Examples of com.adobe.internal.fxg.dom.MaskingNode

     * @param symbolClassType - determines the base type for the SymbolClass
     */
    private void advancedGraphics(GraphicContentNode node, DefineTag symbol,
            SymbolClassType symbolClassType)
    {
        MaskingNode maskNode = node.getMask();

        // Create a new SymbolClass to map to this mask's
        // DefineSprite (see below)
        String className = graphicClass.getClassName();
        if (maskNode != null)
            className += "_Maskee";

        className = createUniqueName(className);

        FXGSymbolClass symbolClass = new FXGSymbolClass();
        symbolClass.setPackageName(packageName);
        symbolClass.setClassName(className);

        // Then record this SymbolClass with the top-level graphic
        // SymbolClass so that it will be associated with the FXG asset.
        graphicClass.addAdditionalSymbolClass(symbolClass);

        StringBuilder buf = new StringBuilder(512);
        buf.append("package ").append(packageName).append("\n");
        buf.append("{\n\n");

        // Determine Base Class
        String baseClassName = null;
        if (symbolClassType == SymbolClassType.SPRITE)
        {
            buf.append("import flash.display.Sprite;\n");
            baseClassName = "Sprite";
        }
        else
        {
            buf.append("import flash.display.Shape;\n");
            baseClassName = "Shape";
        }

        // Advanced BlendModes
        String blendModeImport = generateBlendModeImport(node.blendMode);
        if (blendModeImport != null)
            buf.append(blendModeImport);
        String blendModeShader = generateBlendMode(node.blendMode);

        // Class Definition and Constructor
        buf.append("public class ").append(className).append(" extends ").append(baseClassName).append("\n");
        buf.append("{\n");
        buf.append("    public function ").append(className).append("()\n");
        buf.append("    {\n");
        buf.append("        super();\n");
        buf.append("        this.cacheAsBitmap = true;\n");

        // Alpha and Luminosity Masks
        if (maskNode != null)
        {
            int maskIndex = maskNode.getMaskIndex();
            if (symbolClassType == SymbolClassType.SPRITE)
                buf.append("        this.mask = this.getChildAt(").append(maskIndex).append(");\n");
            else
                buf.append("        this.mask = this.parent.getChildAt(").append(maskIndex).append(");\n");
        }
View Full Code Here

Examples of com.adobe.internal.fxg.dom.MaskingNode

            if (hasAdvancedGraphics(node))
                buf.append("        this.cacheAsBitmap = true;\n");

            // Alpha Masks
            MaskingNode maskNode = node.getMask();
            if (maskNode != null &&
                    (node.getMaskType() == MaskType.ALPHA ||
                     node.getMaskType() == MaskType.LUMINOSITY))
            {
                int maskIndex = maskNode.getMaskIndex();
                buf.append("        this.mask = this.parent.getChildAt(").append(maskIndex).append(");\n");
            }

            // BlendMode Shader
            if (blendModeShader != null)
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.