Examples of FocalGradient


Examples of flash.swf.types.FocalGradient

        return s;
    }

    private Gradient decodeGradient(int shape, int filltype) throws IOException
    {
        Gradient gradient = (filltype == FillStyle.FILL_FOCAL_RADIAL_GRADIENT)? new FocalGradient() : new Gradient();
        r.syncBits();
        gradient.spreadMode = r.readUBits( 2 );
        gradient.interpolationMode = r.readUBits( 2 );
        int count = r.readUBits( 4 );
        gradient.records = new GradRecord[count];
View Full Code Here

Examples of flash.swf.types.FocalGradient

    protected FillStyle createFillStyle(RadialGradientFillNode node, Rect bounds)
    {
        FillStyle fs = new FillStyle();
        fs.type = FillStyle.FILL_FOCAL_RADIAL_GRADIENT;
        fs.matrix = TypeHelper.radialGradientMatrix(node, bounds);
        FocalGradient gradient = new FocalGradient();
        populateGradient(gradient, node.entries, node.interpolationMethod, node.spreadMethod);
        gradient.focalPoint = (float)node.focalPointRatio;
        fs.gradient = gradient;

        return fs;
View Full Code Here

Examples of flash.swf.types.FocalGradient

    protected FillStyle createFillStyle(RadialGradientStrokeNode node, Rect bounds)
    {
        FillStyle fs = new FillStyle();
        fs.type = FillStyle.FILL_FOCAL_RADIAL_GRADIENT;
        fs.matrix = TypeHelper.radialGradientMatrix(node, bounds);
        FocalGradient gradient = new FocalGradient();
        populateGradient(gradient, node.entries, node.interpolationMethod, node.spreadMethod);
        gradient.focalPoint = (float)node.focalPointRatio;
        fs.gradient = gradient;

        return fs;
View Full Code Here

Examples of flash.swf.types.FocalGradient

        return s;
    }

    private Gradient decodeGradient(int shape, int filltype) throws IOException
    {
        Gradient gradient = (filltype == FillStyle.FILL_FOCAL_RADIAL_GRADIENT)? new FocalGradient() : new Gradient();
        r.syncBits();
        gradient.spreadMode = r.readUBits( 2 );
        gradient.interpolationMode = r.readUBits( 2 );
        int count = r.readUBits( 4 );
        gradient.records = new GradRecord[count];
View Full Code Here

Examples of org.apache.flex.swf.types.FocalGradient

     * @return a FocalGradient record
     */
    private FocalGradient readFocalGradient(TagType tagType)
    {
        bitStream.byteAlign();
        final FocalGradient gradient = new FocalGradient();
        gradient.setSpreadMode(bitStream.readUB(2));
        gradient.setInterpolationMode(bitStream.readUB(2));
        final int numGradients = bitStream.readUB(4);
        for (int i = 0; i < numGradients; i++)
        {
            gradient.getGradientRecords().add(readGradRecord(tagType));
        }
        gradient.setFocalPoint(bitStream.readFIXED8());
        return gradient;
    }
View Full Code Here

Examples of org.apache.flex.swf.types.FocalGradient

    protected FillStyle createFillStyle(RadialGradientFillNode node, Rect bounds)
    {
        FillStyle fs = new FillStyle();
        fs.setFillStyleType(FillStyle.FOCAL_RADIAL_GRADIENT_FILL);
        fs.setGradientMatrix(TypeHelper.radialGradientMatrix(node, bounds));
        FocalGradient gradient = new FocalGradient();
        populateGradient(gradient, node.entries, node.interpolationMethod, node.spreadMethod);
        gradient.setFocalPoint((float)node.focalPointRatio);
        fs.setGradient(gradient);

        return fs;
    }
View Full Code Here

Examples of org.apache.flex.swf.types.FocalGradient

    protected FillStyle createFillStyle(RadialGradientStrokeNode node, Rect bounds)
    {
        FillStyle fs = new FillStyle();
        fs.setFillStyleType(FillStyle.FOCAL_RADIAL_GRADIENT_FILL);
        fs.setGradientMatrix(TypeHelper.radialGradientMatrix(node, bounds));
        FocalGradient gradient = new FocalGradient();
        populateGradient(gradient, node.entries, node.interpolationMethod, node.spreadMethod);
        gradient.setFocalPoint((float)node.focalPointRatio);
        fs.setGradient(gradient);

        return fs;
    }
View Full Code Here

Examples of tv.porst.swfretools.parser.structures.FocalGradient

      addNode("InterpolationMode", cgradient.getInterpolationMode());
      addNode("NumGradients", cgradient.getNumGradients());
      addNode("GradientRecords", cgradient.getGradientRecords());
    }
    else if (getUserObject() instanceof FocalGradient) {
      final FocalGradient cgradient = (FocalGradient) getUserObject();
      addNode("SpreadMode", cgradient.getSpreadMode());
      addNode("InterpolationMode", cgradient.getInterpolationMode());
      addNode("NumGradients", cgradient.getNumGradients());
      addNode("GradientRecords", cgradient.getGradientRecords());
      addNode("FocalPoint", cgradient.getFocalPoint());
    }
    else {
      throw new IllegalStateException("Error: Unknown gradient type");
    }
  }
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.