0 Replies Latest reply on Apr 16, 2009 7:52 PM by lifeofgary

    Clipping while printing

      I'm trying to print vector graphics and I want the graphics to be clipped by the edge of the paper.  I'm finding that if I try printing off the top or the left side of the screen instead of clipping (which I want) it transforms the drawing so all the lines are on the screen (which I don't want).

       

      The following code should print an equilateral triangle.  Instead it moves the drawing down 72 points (1 inch) and prints a check mark.  Does anyone know how to accomplish what I want?

       

      private function doClipPrint():void
        {
        var myPrintJob:PrintJob = new PrintJob();
                      
        if (myPrintJob.start())
          {                   
          var sprite:Sprite = new Sprite();
          var g:Graphics = sprite.graphics;
                                    
          g.lineStyle(1, 0x000000);
          g.moveTo(0,0)
          g.lineTo(72,72)
          g.lineTo(2*72, -72)

       

          myPrintJob.addPage(sprite);
          myPrintJob.send();
          }                  
        }

      Thanks!

       

          -Gary