Examples of PlaceObject3Tag


Examples of org.apache.flex.swf.tags.PlaceObject3Tag

        // Keep track of whether a node had a mask and filters as this
        // scenario needs to be special cased to match the rendering order
        // of the ActionScript drawing API.
        boolean hasMaskAndFilters = node.mask != null && node.filters != null;

        PlaceObject3Tag po3 = super.graphicContentNode(node);

        // We skip text nodes because they already generate a symbol class
        // and will handle advanced graphics there
        if (po3 != null && !(node instanceof ITextNode) && hasAdvancedGraphics(node))
        {
            SymbolClassType symbolClassType = SymbolClassType.SHAPE;
            if (hasMaskAndFilters || (node instanceof GroupNode))
                symbolClassType = SymbolClassType.SPRITE;

            advancedGraphics(node, po3.getCharacter(), symbolClassType);
        }

        return po3;
    }
View Full Code Here

Examples of org.apache.flex.swf.tags.PlaceObject3Tag

     * @param node - the Group node
     * @return the PlaceObject3Tag definition that would place the Group on stage
     */
    protected PlaceObject3Tag group(GroupNode node)
    {
        PlaceObject3Tag po3 = super.group(node);

        if (po3 != null && hasAdvancedGraphics(node))
            advancedGraphics(node, po3.getCharacter(), SymbolClassType.SPRITE);

        return po3;
    }
View Full Code Here

Examples of org.apache.flex.swf.tags.PlaceObject3Tag

            // SymbolClass so that it will be associated with the FXG asset.
            graphicClass.addAdditionalSymbolClass(spriteSymbolClass);

            // Create a DefineSpriteTag to hold this TextGraphic
            DefineSpriteTag textSprite = createDefineSpriteTag(className);
            PlaceObject3Tag po3 = PlaceObject3Tag(textSprite, node.createGraphicContext());
            spriteStack.push(textSprite);
           
            //Add dependencies
            addDependency(packageFlashEvent);
            addDependency(packageTextLayoutFormat);
View Full Code Here

Examples of org.apache.flex.swf.tags.PlaceObject3Tag

        else
        {
             shapeRecords = ShapeHelper.rectangle(0.0, 0.0, node.width, node.height);
        }
       
        PlaceObject3Tag po3 = placeDefineShapeTag(node, shapeRecords, node.fill, node.stroke, context);
        return po3;
    }
View Full Code Here

Examples of org.apache.flex.swf.tags.PlaceObject3Tag

            graphics.definitions = definitions;
            graphics.problems = problems;
            graphics.definition(node.definition, definitionSprite);
        }

        PlaceObject3Tag po3 = PlaceObject3Tag(definitionSprite, node.createGraphicContext());
        return po3;
    }
View Full Code Here

Examples of org.apache.flex.swf.tags.PlaceObject3Tag

            PlaceObject3Tag(clipShape, clipContext);
            spriteStack.pop();
           
            // Set the depth of the mask to that of the bitmap image fill
            clipContext.setTransform(context.getTransform());
            PlaceObject3Tag po3clip = PlaceObject3Tag(clipSprite, clipContext);
            po3clip.setClipDepth(po3clip.getDepth() + 1);
            po3clip.setHasClipDepth(true);
           
            Styles styles = new Styles(new FillStyleArray(), new LineStyleArray());
            // Then, process the bitmap image fill
            ShapeWithStyle sws = new ShapeWithStyle(styles);
           
            int lineStyleIndex = 0;
            int fillStyle0Index = 1;
            int fillStyle1Index = 0;

            FillStyle fillStyle = createFillStyle(fill, edgeBounds);
            if(fillStyle != null)
                sws.getFillStyles().add(fillStyle);

            if (windings.length > 0)
                ShapeHelper.setPathStyles(shapeRecords, lineStyleIndex, fillStyle0Index, fillStyle1Index, styles);
            else
                ShapeHelper.setStyles(shapeRecords, lineStyleIndex, fillStyle0Index, fillStyle1Index, styles);
           
            sws.addShapeRecords(shapeRecords);
           
            DefineShape4Tag imageShape = new DefineShape4Tag();
            imageShape.setShapes(sws);
            imageShape.setShapeBounds(edgeBounds);
            imageShape.setEdgeBounds(edgeBounds);
            if ((fill != null) &&( windings.length > 0))
            {
                Winding windingValue = windings[0];
                imageShape.setUsesFillWindingRule(windingValue == Winding.NON_ZERO);
            }
            PlaceObject3Tag po3 = PlaceObject3Tag(imageShape, context);       
            
            if (stroke != null)
            {
                //make a copy of ShapeRecord for strokes
                ArrayList<ShapeRecord> shapeRecords2 = new ArrayList<ShapeRecord>(shapeRecords);
                Collections.copy(shapeRecords2, shapeRecords);

                Styles strokeStyles = new Styles(new FillStyleArray(), new LineStyleArray());

                //generate the define sprite for the stroke object with no clipping
                ShapeWithStyle swsStroke = new ShapeWithStyle(strokeStyles);

                // Consider linestyle stroke widths with bounds calculation              
                AbstractStrokeNode strokeNode = (AbstractStrokeNode) stroke;
                LineStyle ls = createGenericLineStyle(strokeNode);
                Rect shapeBounds =  node.getBounds(shapeRecords2, ls);    
               
                LineStyle lineStyle = createLineStyle(stroke, shapeBounds);
                swsStroke.getLineStyles().add(lineStyle);
               
                lineStyleIndex = 1;
                fillStyle0Index = 0;
                fillStyle1Index = 0;
                ShapeHelper.replaceStyles(shapeRecords2, lineStyleIndex, fillStyle0Index, fillStyle1Index, strokeStyles);
        
                swsStroke.addShapeRecords(shapeRecords2);

                DefineShape4Tag strokeShape = new DefineShape4Tag();
                strokeShape.setShapes(swsStroke);
                strokeShape.setShapeBounds(shapeBounds);
                strokeShape.setEdgeBounds(edgeBounds);
                po3 = PlaceObject3Tag(strokeShape, context);   
            }            
            spriteStack.pop();
           
            po3 = PlaceObject3Tag(imageSprite, new GraphicContext());
           
            // If filters were not processed, place the topmost sprite in display list and apply filters
            // This is done to force processing of masks before filters
            if (filters != null)
            {
                DefineSpriteTag sprite = spriteStack.pop();
               
                GraphicContext gc = new GraphicContext();
                gc.filters = filters;
                PlaceObject3Tag poFilter = PlaceObject3Tag(sprite, gc);
                return poFilter;           
            }
           
            return po3;
           
        }
        else
        {
          DefineShapeTag shape = createDefineShapeTag(node, shapeRecords, fill, stroke, context.getTransform(), windings);
          PlaceObject3Tag po3 = PlaceObject3Tag(shape, context);
          return po3;
        }
      
    }
View Full Code Here

Examples of org.apache.flex.swf.tags.PlaceObject3Tag

    }

    public void dumpPlaceObject23(PlaceObjectTag tag)
    {
        PlaceObject2Tag tag2 = tag instanceof PlaceObject2Tag ? (PlaceObject2Tag)tag : null;
        PlaceObject3Tag tag3 = tag instanceof PlaceObject3Tag ? (PlaceObject3Tag)tag : null;

        if (tag != null || (tag2 != null && tag2.isHasCharacter()))
        {
            if (tag.getCharacter() != null && currentFrame != null &&
                currentFrame.getSymbolName(tag.getCharacter()) != null)
            {
                indent();
                out.println("<!-- instance of " + idRef(tag.getCharacter()) + " -->");
            }
        }

        open(tag);
        if (tag3 != null && tag3.isHasClassName())
            out.print(" className=\"" + tag3.getClassName() + "\"");
        if (tag3 != null && tag3.isHasImage())
            out.print(" hasImage=\"true\" ");
        if (tag != null || (tag2 != null && tag2.isHasCharacter()))
            out.print(" idref=\"" + idRef(tag.getCharacter()) + "\"");
        if (tag2 != null && tag2.isHasName())
            out.print(" name=\"" + tag2.getName() + "\"");
        out.print(" depth=\"" + tag.getDepth() + "\"");
        if (tag2 != null && tag2.isHasClipDepth())
            out.print(" clipDepth=\"" + tag2.getClipDepth() + "\"");
        if (tag3 != null && tag3.isHasCacheAsBitmap())
            out.print(" cacheAsBitmap=\"true\"");
        if (tag2 != null && tag2.isHasRatio())
            out.print(" ratio=\"" + tag2.getRatio() + "\"");
        if (tag2 != null && tag2.isHasColorTransform())
            out.print(" cxform=\"" + tag2.getColorTransform() + "\"");
        else if (tag.getColorTransform() != null)
            out.print(" cxform=\"" + tag.getColorTransform() + "\"");
        if (tag.getMatrix() != null || (tag2 != null && tag2.isHasMatrix()))
            out.print(" matrix=\"" + tag.getMatrix() + "\"");
        if (tag3 != null && tag3.isHasBlendMode())
            out.print(" blendmode=\"" + tag3.getBlendMode() + "\"");
        if (tag3 != null && tag3.isHasFilterList())
        {
            // todo - pretty print this once we actually care
            out.print(" filters=\"");
            for (Filter filter : tag3.getSurfaceFilterList())
            {
                out.print(filter.getFilterID() + " ");
            }
            out.print("\"");
        }
View Full Code Here

Examples of tv.porst.swfretools.parser.tags.PlaceObject3Tag

      addNode("Name", ctag.getName());
      addNode("ClipDepth", ctag.getClipDepth());
      addNode("ClipActions", ctag.getClipActions());
    }
    else if (tag instanceof PlaceObject3Tag) {
      final PlaceObject3Tag ctag = (PlaceObject3Tag) tag;

      addNode("PlaceFlagHasClipActions", ctag.getPlaceFlagHasClipActions());
      addNode("PlaceFlagHasClipDepth", ctag.getPlaceFlagHasClipDepth());
      addNode("PlaceFlagHasName", ctag.getPlaceFlagHasName());
      addNode("PlaceFlagHasRatio", ctag.getPlaceFlagHasRatio());
      addNode("PlaceFlagHasColorTransform", ctag.getPlaceFlagHasColorTransform());
      addNode("PlaceFlagHasMatrix", ctag.getPlaceFlagHasMatrix());
      addNode("PlaceFlagHasCharacter", ctag.getPlaceFlagHasCharacter());
      addNode("PlaceFlagHasMove", ctag.getPlaceFlagHasMove());
      addNode("Reserved", ctag.getReserved());
      addNode("PlaceFlagHasImage", ctag.getPlaceFlagHasImage());
      addNode("PlaceFlagHasClassName", ctag.getPlaceFlagHasClassName());
      addNode("PlaceFlagHasCacheAsBitmap", ctag.getPlaceFlagHasCacheAsBitmap());
      addNode("PlaceFlagHasBlendMode", ctag.getPlaceFlagHasBlendMode());
      addNode("PlaceFlagHasFilterList", ctag.getPlaceFlagHasFilterList());
      addNode("Depth", ctag.getDepth());
      addNode("ClassName", ctag.getClassName());
      addNode("CharacterID", ctag.getCharacterId());
      addNode("Matrix", ctag.getMatrix());
      addNode("ColorTransform", ctag.getColorTransform());
      addNode("Ratio", ctag.getRatio());
      addNode("Name", ctag.getName());
      addNode("ClipDepth", ctag.getClipDepth());
      addNode("SurfaceFilterList", ctag.getSurfaceFilterList());
      addNode("BlendMode", ctag.getBlendMode());
      addNode("BitmapCache", ctag.getBitmapCache());
      addNode("ClipActions", ctag.getClipActions());
    }
    else if (tag instanceof PlaceObjectTag) {
      final PlaceObjectTag ctag = (PlaceObjectTag) tag;

      addNode("CharacterID", ctag.getCharacterId());
      addNode("Depth", ctag.getDepth());
      addNode("Matrix", ctag.getMatrix());
      addNode("ColorTransform", ctag.getColorTransform());
    }
    else if (tag instanceof RemoveObject2Tag) {
      final RemoveObject2Tag ctag = (RemoveObject2Tag) tag;

      addNode("Depth", ctag.getDepth());
    }
    else if (tag instanceof RemoveObjectTag) {
      final RemoveObjectTag ctag = (RemoveObjectTag) tag;

      addNode("CharacterID", ctag.getCharacterId());
      addNode("Depth", ctag.getDepth());
    }
    else if (tag instanceof ScriptLimitsTag) {
      final ScriptLimitsTag ctag = (ScriptLimitsTag) tag;

      addNode("MaxRecursionDepth", ctag.getMaxRecursionDepth());
      addNode("ScriptTimeoutSeconds", ctag.getScriptTimeoutSeconds());
    }
    else if (tag instanceof SetBackgroundColorTag) {
      final SetBackgroundColorTag ctag = (SetBackgroundColorTag) tag;

      addNode("BackgroundColor", ctag.getBackgroundColor());
    }
    else if (tag instanceof SetTabIndexTag) {
      final SetTabIndexTag ctag = (SetTabIndexTag) tag;

      addNode("Depth", ctag.getDepth());
      addNode("TabIndex", ctag.getTabIndex());
    }
    else if (tag instanceof ShowFrameTag) {
      // Nothing to do here
    }
    else if (tag instanceof SoundStreamBlockTag) {
      final SoundStreamBlockTag ctag = (SoundStreamBlockTag) tag;

      addNode("StreamSoundData", ctag.getStreamSoundData());
    }
    else if (tag instanceof SoundStreamHead2Tag) {
      final SoundStreamHead2Tag ctag = (SoundStreamHead2Tag) tag;

      addNode("Reserved", ctag.getReserved());
      addNode("PlaybackSoundRate", ctag.getPlaybackSoundRate());
      addNode("PlaybackSoundSize", ctag.getPlaybackSoundSize());
      addNode("PlaybackSoundType", ctag.getPlaybackSoundType());
      addNode("StreamSoundCompression", ctag.getStreamSoundCompression());
      addNode("StreamSoundRate", ctag.getStreamSoundRate());
      addNode("StreamSoundSize", ctag.getStreamSoundSize());
      addNode("StreamSoundType", ctag.getStreamSoundType());
      addNode("StreamSoundSampleCount", ctag.getStreamSoundSampleCount());
      addNode("LatencySeek", ctag.getLatencySeek());
    }
    else if (tag instanceof SoundStreamHeadTag) {
      final SoundStreamHeadTag ctag = (SoundStreamHeadTag) tag;

      addNode("Reserved", ctag.getReserved());
      addNode("PlaybackSoundRate", ctag.getPlaybackSoundRate());
      addNode("PlaybackSoundSize", ctag.getPlaybackSoundSize());
      addNode("PlaybackSoundType", ctag.getPlaybackSoundType());
      addNode("StreamSoundCompression", ctag.getStreamSoundCompression());
      addNode("StreamSoundRate", ctag.getStreamSoundRate());
      addNode("StreamSoundSize", ctag.getStreamSoundSize());
      addNode("StreamSoundType", ctag.getStreamSoundType());
      addNode("StreamSoundSampleCount", ctag.getStreamSoundSampleCount());
      addNode("LatencySeek", ctag.getLatencySeek());
    }
    else if (tag instanceof StartSound2Tag) {
      final StartSound2Tag ctag = (StartSound2Tag) tag;

      addNode("SoundClassName", ctag.getSoundClassName());
      addNode("SoundInfo", ctag.getSoundInfo());
    }
    else if (tag instanceof StartSoundTag) {
      final StartSoundTag ctag = (StartSoundTag) tag;

      addNode("SoundID", ctag.getSoundId());
      addNode("SoundInfo", ctag.getSoundInfo());
    }
    else if (tag instanceof SymbolClassTag) {
      final SymbolClassTag ctag = (SymbolClassTag) tag;

      addNode("NumSymbols", ctag.getNumSymbols());
      addNode("Symbols", ctag.getSymbols());
    }
    else if (tag instanceof VideoFrameTag) {
      final VideoFrameTag ctag = (VideoFrameTag) tag;

      addNode("StreamID", ctag.getStreamId());
      addNode("FrameNum", ctag.getFrameNum());
      addNode("VideoData", ctag.getVideoData());
    }
    else if (tag instanceof RawABCTag) {
      final RawABCTag ctag = (RawABCTag) tag;

      addNode("ABCData", ctag.getAbcData());
    }
    else if (tag instanceof DoABCTag) {
      final DoABCTag ctag = (DoABCTag) tag;

      addNode("Name", ctag.getName());
      addNode("Flags", ctag.getFlags());
      addNode("ABCData", ctag.getAbcData());
    }
  }
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.