LibreOffice Module sd (master) 1
Public Member Functions | Public Attributes | List of all members
sd::slidesorter::view::FramePainter::OffsetBitmap Class Reference

Bitmap with offset that is used when the bitmap is painted. More...

Collaboration diagram for sd::slidesorter::view::FramePainter::OffsetBitmap:
[legend]

Public Member Functions

 OffsetBitmap (const BitmapEx &rBitmap, const sal_Int32 nHorizontalPosition, const sal_Int32 nVerticalPosition)
 Create one of the eight shadow bitmaps from one that combines them all. More...
 
void PaintCorner (OutputDevice &rDevice, const Point &rAnchor) const
 Use the given device to paint the bitmap at the location that is the sum of the given anchor and the internal offset. More...
 
void PaintSide (OutputDevice &rDevice, const Point &rAnchor1, const Point &rAnchor2, const OffsetBitmap &rCornerBitmap1, const OffsetBitmap &rCornerBitmap2) const
 Use the given device to paint the bitmap stretched between the two given locations. More...
 
void PaintCenter (OutputDevice &rDevice, const ::tools::Rectangle &rBox) const
 Fill the given rectangle with the bitmap. More...
 

Public Attributes

BitmapEx maBitmap
 
Point maOffset
 

Detailed Description

Bitmap with offset that is used when the bitmap is painted.

The bitmap

Definition at line 47 of file SlsFramePainter.hxx.

Constructor & Destructor Documentation

◆ OffsetBitmap()

sd::slidesorter::view::FramePainter::OffsetBitmap::OffsetBitmap ( const BitmapEx rBitmap,
const sal_Int32  nHorizontalPosition,
const sal_Int32  nVerticalPosition 
)

Create one of the eight shadow bitmaps from one that combines them all.

This larger bitmap is expected to have dimension NxN with N=1+2*M. Of this larger bitmap there are created four corner bitmaps of size 2*M x 2*M and four side bitmaps of sizes 1xM (top and bottom) and Mx1 (left and right). The corner bitmaps have each one quadrant of size MxM that is painted under the interior of the frame.

Parameters
rBitmapThe larger bitmap of which the eight shadow bitmaps are cut out from.
nHorizontalPositionValid values are -1 (left), 0 (center), and +1 (right).
nVerticalPositionValid values are -1 (top), 0 (center), and +1 (bottom).

Definition at line 100 of file SlsFramePainter.cxx.

References BitmapEx::GetSizePixel(), Size::Height(), BitmapEx::IsEmpty(), maBitmap, maOffset, BitmapEx::Scale(), and Size::Width().

Member Function Documentation

◆ PaintCenter()

void sd::slidesorter::view::FramePainter::OffsetBitmap::PaintCenter ( OutputDevice rDevice,
const ::tools::Rectangle rBox 
) const

Fill the given rectangle with the bitmap.

Definition at line 208 of file SlsFramePainter.cxx.

References OutputDevice::DrawBitmapEx(), Size::Height(), and Size::Width().

Referenced by sd::slidesorter::view::FramePainter::PaintFrame().

◆ PaintCorner()

void sd::slidesorter::view::FramePainter::OffsetBitmap::PaintCorner ( OutputDevice rDevice,
const Point rAnchor 
) const

Use the given device to paint the bitmap at the location that is the sum of the given anchor and the internal offset.

Definition at line 142 of file SlsFramePainter.cxx.

References OutputDevice::DrawBitmapEx().

Referenced by sd::slidesorter::view::FramePainter::PaintFrame().

◆ PaintSide()

void sd::slidesorter::view::FramePainter::OffsetBitmap::PaintSide ( OutputDevice rDevice,
const Point rAnchor1,
const Point rAnchor2,
const OffsetBitmap rCornerBitmap1,
const OffsetBitmap rCornerBitmap2 
) const

Use the given device to paint the bitmap stretched between the two given locations.

Offsets of the adjacent corner bitmaps and the offset of the side bitmap are used to determine the area that is to be filled with the side bitmap.

Definition at line 150 of file SlsFramePainter.cxx.

References OutputDevice::DrawBitmapEx(), BitmapEx::GetSizePixel(), Size::Height(), maBitmap, maOffset, Size::Width(), Point::X(), and Point::Y().

Referenced by sd::slidesorter::view::FramePainter::PaintFrame().

Member Data Documentation

◆ maBitmap

BitmapEx sd::slidesorter::view::FramePainter::OffsetBitmap::maBitmap

◆ maOffset

Point sd::slidesorter::view::FramePainter::OffsetBitmap::maOffset

Definition at line 50 of file SlsFramePainter.hxx.

Referenced by OffsetBitmap(), and PaintSide().


The documentation for this class was generated from the following files: