LibreOffice Module vcl (master) 1
Functions
PictReaderShapePrivate Namespace Reference

Osnola: IMPORTANT NOTE: some Quickdraw lines/frames can not be "quickly" drawn exactly: for instance, when PenSize=(1,1), the line from (0,0) to (8,0) corresponds to the rectangle (0,0)(0,1)(9,1)(9,0), which can only be drawn by drawing a rectangle. More...

Functions

static tools::Rectangle contractRectangle (bool drawFrame, tools::Rectangle const &rect, Size const &pSize)
 returns an inside rectangle knowing the penSize in order to obtain the `‘correct’' position when we draw a frame in wide length More...
 

Detailed Description

Osnola: IMPORTANT NOTE: some Quickdraw lines/frames can not be "quickly" drawn exactly: for instance, when PenSize=(1,1), the line from (0,0) to (8,0) corresponds to the rectangle (0,0)(0,1)(9,1)(9,0), which can only be drawn by drawing a rectangle.

Drawing a non horizontal/vertical will imply to draw a polygon, ... Similarly, drawing the frame of a rectangle (0,0)(0,1)(9,1)(9,0) when PenSize=(1,1), will imply to draw a rectangle (0.5,0.5)(0.5,8.5)(8.5,8.5)(8.5,0.5) with linewidth=1...

Here, we choose:

Function Documentation

◆ contractRectangle()

static tools::Rectangle PictReaderShapePrivate::contractRectangle ( bool  drawFrame,
tools::Rectangle const &  rect,
Size const &  pSize 
)
static

returns an inside rectangle knowing the penSize in order to obtain the `‘correct’' position when we draw a frame in wide length

Definition at line 41 of file shape.cxx.

References tools::Rectangle::Bottom(), Size::Height(), tools::Rectangle::Left(), tools::Rectangle::Right(), tools::Rectangle::Top(), Size::Width(), X, and Y.

Referenced by PictReaderShape::drawArc(), PictReaderShape::drawEllipse(), PictReaderShape::drawRectangle(), and PictReaderShape::drawRoundRectangle().