Adds a blank page.
@param	rect The page dimension
@param	rotation The rotation angle in degrees
@since	2.1.5
509365
public void addPage(Rectangle rect, int rotation) {
    	PdfRectangle mediabox = new PdfRectangle(rect, rotation);
    	PageResources resources = new PageResources();
    	PdfPage page = new PdfPage(mediabox, new HashMap(), resources.getResources(), 0);
    	page.put(PdfName.TABS, getTabs());
    	root.addPage(page);
    	++currentPageNumber;
    }
668539
public void rotate(Quaternion rotation) {
		Transform3D tr = new Transform3D();
		tr.setRotation(rotation);
		transform(tr);
	}
1240826
public void rotate(Quaternion rotation) {
		Transform3D m = new Transform3D();
		m.setRotation(rotation);
		m.transform(this.getSegmentVector());
		this.getSegmentVector().normalize();
	}
810686
public void invalidateRegion (Rectangle rect)
    {
        if (isValidSize(rect.width, rect.height)) {
            addDirtyRegion((Rectangle)rect.clone());
        }
    }
691836
def draw_rect(self, rect):
        
        check_int_err(lib.SDL_RenderDrawRect(self._ptr, rect._ptr))
1162345
public function rotatedText($x, $y, $txt, $angle)
    {
        //Text rotated around its origin
        $this->rotate($angle, $x, $y);
        $this->Text($x, $y, $txt);
        $this->rotate(0);
    }
182920
protected void addPageComponent(PageComponent pageComponent) {
        pageComponents.add(pageComponent);
        doAddPageComponent(pageComponent);
        pageComponent.addPropertyChangeListener(pageComponentUpdater);

        fireOpened(pageComponent);
    }
1230077
@Override
    public void createLayout(Dimension dim, Rectangle visibleRect)
    {
        if (pdfdocument != null) //PDF mode: create the layout only when the DOM tree is already finished
        {
            if (pdfLoaded)
                createPdfLayout(dim);
        }
        else //DOM mode
        {
        	if (root != null)
        		super.createLayout(dim, visibleRect);
        }
    }
1220455
public static BufferedImage rotate(BufferedImage image, int angle)
    {
        final int width = image.getWidth();
        final int height = image.getHeight();
        final int transparency = image.getColorModel().getTransparency();

        final Rectangle rectangle = new Rectangle(0, 0, width, height);
        rectangle.rotate(angle);

        final BufferedImage rotated = createImage(rectangle.getWidth(), rectangle.getHeight(), transparency);
        final Graphics2D g = rotated.createGraphics();

        optimizeGraphicsSpeed(g);
        g.rotate(Math.toRadians(angle), rectangle.getWidth() / 2.0, rectangle.getHeight() / 2.0);

        final double ox = rectangle.getWidth() - (double) width;
        final double oy = rectangle.getHeight() - (double) height;
        final double cos = UtilMath.cos(angle);
        final double sin = UtilMath.sin(angle);
        final double angleOffsetX = sin * ox + cos * oy;
        final double angleOffsetY = -sin * oy + cos * ox;

        g.drawImage(image, null, (int) ((ox - angleOffsetX) / 2.0), (int) ((oy - angleOffsetY) / 2.0));
        g.dispose();

        return rotated;
    }
1336837
def rectangle(self, rect, attr=None, fill=u' '):
        '''
        x0, y0, x1, y1 = rect
        n = DWORD(0)
        if attr is None:
            attr = self.attr
        for y in range(y0, y1):
            pos = self.fixcoord(x0, y)
            self.FillConsoleOutputAttribute(self.hout, attr, x1 - x0, 
                                            pos, byref(n))
            self.FillConsoleOutputCharacterW(self.hout, ord(fill[0]), x1 - x0,
                                             pos, byref(n))
230910
public void addRotation(int axis1, int axis2, double angle) {
    // TODO: throw an exception instead of using assert
    assert (axis1 >= 0);
    assert (axis1 < dim);
    assert (axis1 >= 0);
    assert (axis2 < dim);
    assert (axis1 != axis2);

    // reset inverse transformation - needs recomputation.
    inv = null;

    double[][] ht = new double[dim + 1][dim + 1];
    // identity matrix
    for(int i = 0; i < dim + 1; i++) {
      ht[i][i] = 1.0;
    }
    // insert rotation values
    final DoubleWrapper tmp = new DoubleWrapper(); // To return cosine
    double s = FastMath.sinAndCos(angle, tmp), c = tmp.value;
    ht[axis1][axis1] = +c;
    ht[axis1][axis2] = -s;
    ht[axis2][axis1] = +s;
    ht[axis2][axis2] = +c;
    // Multiply from left
    trans = times(ht, trans);
  }
977923
public Vector4d rotate(Quaterniondc quat, Vector4d dest) {
        quat.transform(this, dest);
        return dest;
    }
1260556
def addRectAnnot(self, rect):
        """"""
        CheckParent(self)

        val = _fitz.Page_addRectAnnot(self, rect)

        if not val: return
        val.thisown = True
        val.parent = weakref.proxy(self)
        self._annot_refs[id(val)] = val

        return val
431663
def setRect( self, rect ):
        
        mwidth  = self.minimumWidth()
        mheight = self.minimumHeight()
        
        if ( rect.width() < mwidth ):
            rect.setWidth(mwidth)
        if ( rect.height() < mheight ):
            rect.setHeight(mheight)
        
        return super(XNode, self).setRect(rect)
1012467
private void addLeafDelta(Segment10 segment,
                            int pid, 
                            int nextPid,
                            int address,
                            int length)
  {
    Page10 page = _pageMap.get(pid);
    
    if (page != null && page.sequence() < segment.sequence()) {
      return;
    }
    
    if (page != null) {
      page.addDelta(address, length);
    }
  }
1325380
public void fillRectangle(Rectangle rect, Color color) {
		template.saveState();
		setFill(color);
		template.rectangle(origX + rect.getLeft(), origY + rect.getBottom(), rect.getWidth(), rect.getHeight());
		template.fill();
		template.restoreState();
	}
619690
public void set(Rect src) {
        this.left = src.left;
        this.top = src.top;
        this.right = src.right;
        this.bottom = src.bottom;
    }