1 Reply Latest reply on Dec 2, 2009 9:08 AM by matt_chotin

    IStroke(.apply) incompatibility

    cjolif-Fc6gNO

      Any guidance on what to pass to IStroke.apply to get the same result as we got before? Can targetOrigin be null in which case it goes back to the old default?

       

      Thanks,

        • 1. Re: IStroke(.apply) incompatibility
          matt_chotin Level 3

          Sorry, not sure why this change didn't make it out publicly.  Some changes were made to IStroke and IFill back in October.

           

          IStroke:

          Old:
          function apply(graphics:Graphics, bounds:Rectangle):void;
          function createGraphicsStroke(bounds:Rectangle):GraphicsStroke;

          New:
          function apply(graphics:Graphics, targetBounds:Rectangle, targetOrigin:Point):void;
          function createGraphicsStroke(targetBounds:Rectangle, targetOrigin:Point):GraphicsStroke;

          IFill:

          Old:
          function begin(target:Graphics, bounds:Rectangle):void;

          New:
          function begin(target:Graphics, targetBounds:Rectangle, targetOrigin:Point):void;


          The bounds parameter was renamed, but the behavior is the same. The targetOrigin is the point that defines the origin (0,0) of the shape in the coordinate system of the target. For most users, just pass in the x,y values from targetBounds as the targetOrigin.