Examples of StyleChangeRecord


Examples of flash.swf.types.StyleChangeRecord

      {
        indent();
        ShapeRecord shape = (ShapeRecord)it.next();
        if (shape instanceof StyleChangeRecord)
        {
          StyleChangeRecord styleChange = (StyleChangeRecord)shape;
          out.print("<styleChange ");
          if (styleChange.stateMoveTo)
          {
            out.print("dx='" + styleChange.moveDeltaX + "' dy='" + styleChange.moveDeltaY + "' ");
          }
View Full Code Here

Examples of flash.swf.types.StyleChangeRecord

      {
        indent();
        ShapeRecord shape = (ShapeRecord)it.next();
        if (shape instanceof StyleChangeRecord)
        {
          StyleChangeRecord styleChange = (StyleChangeRecord)shape;
          out.print("SSCR" + styleChange.nMoveBits() + "\t");
          if (styleChange.stateMoveTo)
          {
            out.print(styleChange.moveDeltaX + "\t" + styleChange.moveDeltaY);
           
            if (startX == 0 && startY == 0)
View Full Code Here

Examples of flash.swf.types.StyleChangeRecord

                boolean stateMoveTo = r.readBit();

                if (stateNewStyles || stateLineStyle || stateFillStyle1 ||
                        stateFillStyle0 || stateMoveTo)
                {
                    StyleChangeRecord s = decodeStyleChangeRecord(stateNewStyles, stateLineStyle,
                                                                  stateFillStyle1, stateFillStyle0, stateMoveTo,
                                                                  shape, numFillBits, numLineBits);

                    list.add(s);
                }
View Full Code Here

Examples of flash.swf.types.StyleChangeRecord

                                                      boolean stateMoveTo,
                                                      int shape,
                                                      int[] numFillBits,
                                                      int[] numLineBits) throws IOException
    {
        StyleChangeRecord s = new StyleChangeRecord();

        s.stateNewStyles = stateNewStyles;
        s.stateLineStyle = stateLineStyle;
        s.stateFillStyle1 = stateFillStyle1;
        s.stateFillStyle0 = stateFillStyle0;
View Full Code Here

Examples of flash.swf.types.StyleChangeRecord

        int dya = stt;
        int dyb = sbt - stt;
        int dyc = (int)(bitmap.height * SwfConstants.TWIPS_PER_PIXEL) - sbt;

        // border
        shapeRecords.add(new StyleChangeRecord(0, dya, 0, 0, 1));
        shapeRecords.add(new StraightEdgeRecord(0, -dya));
        shapeRecords.add(new StraightEdgeRecord(dxa, 0));
        shapeRecords.add(new StyleChangeRecord(0, 0, 2));
        shapeRecords.add(new StraightEdgeRecord(dxb, 0));
        shapeRecords.add(new StyleChangeRecord(0, 0, 3));
        shapeRecords.add(new StraightEdgeRecord(dxc, 0));
        shapeRecords.add(new StraightEdgeRecord(0, dya));
        shapeRecords.add(new StyleChangeRecord(0, 0, 6));
        shapeRecords.add(new StraightEdgeRecord(0, dyb));
        shapeRecords.add(new StyleChangeRecord(0, 0 ,9));
        shapeRecords.add(new StraightEdgeRecord(0, dyc));
        shapeRecords.add(new StraightEdgeRecord(-dxc, 0));
        shapeRecords.add(new StyleChangeRecord(0, 0, 8));
        shapeRecords.add(new StraightEdgeRecord(-dxb, 0));
        shapeRecords.add(new StyleChangeRecord(0, 0, 7));
        shapeRecords.add(new StraightEdgeRecord(-dxa, 0));
        shapeRecords.add(new StraightEdgeRecord(0, -dyc));
        shapeRecords.add(new StyleChangeRecord(0, 0, 4));
        shapeRecords.add(new StraightEdgeRecord(0, -dyb));

        // down 1
        shapeRecords.add(new StyleChangeRecord(dxa, 0, 0, 2, 1));
        shapeRecords.add(new StraightEdgeRecord(0, dya));
        shapeRecords.add(new StyleChangeRecord(0, 5, 4));
        shapeRecords.add(new StraightEdgeRecord(0, dyb));
        shapeRecords.add(new StyleChangeRecord(0, 8, 7));
        shapeRecords.add(new StraightEdgeRecord(0, dyc));

        // down 2
        shapeRecords.add(new StyleChangeRecord(dxa + dxb, 0, 0, 3, 2));
        shapeRecords.add(new StraightEdgeRecord(0, dya));
        shapeRecords.add(new StyleChangeRecord(0, 6, 5));
        shapeRecords.add(new StraightEdgeRecord(0, dyb));
        shapeRecords.add(new StyleChangeRecord(0, 9, 8));
        shapeRecords.add(new StraightEdgeRecord(0, dyc));

        // right 1
        shapeRecords.add(new StyleChangeRecord(0, dya, 0, 1, 4));
        shapeRecords.add(new StraightEdgeRecord(dxa, 0));
        shapeRecords.add(new StyleChangeRecord(0, 2, 5));
        shapeRecords.add(new StraightEdgeRecord(dxb, 0));
        shapeRecords.add(new StyleChangeRecord(0, 3, 6));
        shapeRecords.add(new StraightEdgeRecord(dxc, 0));

        // right 2
        shapeRecords.add(new StyleChangeRecord(0, dya + dyb, 0, 4, 7));
        shapeRecords.add(new StraightEdgeRecord(dxa, 0));
        shapeRecords.add(new StyleChangeRecord(0, 5, 8));
        shapeRecords.add(new StraightEdgeRecord(dxb, 0));
        shapeRecords.add(new StyleChangeRecord(0, 6, 9));
        shapeRecords.add(new StraightEdgeRecord(dxc, 0));

        DefineShape shape = new DefineShape(TagValues.stagDefineShape4);
        shape.bounds = TypeHelper.rect(width, height);
        shape.edgeBounds = shape.bounds;
View Full Code Here

Examples of flash.swf.types.StyleChangeRecord

    {
    }

    public void styleChange(Attributes attributes) throws SAXParseException
    {
        StyleChangeRecord styleChange = new StyleChangeRecord();
        if (hasAttribute(attributes, "dx") || hasAttribute(attributes, "dy"))
        {
            styleChange.stateMoveTo = true;
            styleChange.moveDeltaX = parseInt(getAttribute(attributes, "dx"));
            styleChange.moveDeltaY = parseInt(getAttribute(attributes, "dy"));
View Full Code Here

Examples of flash.swf.types.StyleChangeRecord

        stack.push(styleChange);
    }

    public void styleChange()
    {
        StyleChangeRecord styleChange = (StyleChangeRecord)stack.pop();
        if (fillstyles.size() != 0)
        {
            styleChange.stateNewStyles = true;
        }
View Full Code Here

Examples of flash.swf.types.StyleChangeRecord

                ShapeRecord record = it.next();
                if (record instanceof StyleChangeRecord)
          {
                    // style change
                    w.writeBit(false);
                    StyleChangeRecord change = (StyleChangeRecord) record;
                    encodeStyleChangeRecord(w, change, numFillBits, numLineBits, shape);
          }
          else
          {
                    // edge
View Full Code Here

Examples of flash.swf.types.StyleChangeRecord

        {
            dx *= SwfConstants.TWIPS_PER_PIXEL;
            dy *= SwfConstants.TWIPS_PER_PIXEL;
        }

        StyleChangeRecord scr = new StyleChangeRecord();
        scr.setMove((int)Math.rint(dx), (int)Math.rint(dy));

        //Reset rounding counters, as this info is only useful per sub-shape/fill closure
        dxSumTwips = 0;
        dySumTwips = 0;

        //Check styles
        if (lineStyleHasChanged)
        {
            scr.setLinestyle(lineStyle);
            lineStyleHasChanged = false;
        }

        if (fillStyle0HasChanged && useFillStyle0)
        {
            scr.setFillStyle0(fillStyle0);
            fillStyle0HasChanged = false;
        }

        if (fillStyle1HasChanged && useFillStyle1)
        {
            scr.setFillStyle1(fillStyle1);
            fillStyle1HasChanged = false;
        }

        lastMoveTo.x = x;
        lastMoveTo.y = y;
View Full Code Here

Examples of flash.swf.types.StyleChangeRecord

                ShapeRecord record = it.next();
                if (record instanceof StyleChangeRecord)
          {
                    // style change
                    w.writeBit(false);
                    StyleChangeRecord change = (StyleChangeRecord) record;
                    encodeStyleChangeRecord(w, change, numFillBits, numLineBits, shape);
          }
          else
          {
                    // edge
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.