vdr
1.7.31
|
#include <osd.h>
Public Member Functions | |
cPixmap (void) | |
cPixmap (int Layer, const cRect &ViewPort, const cRect &DrawPort=cRect::Null) | |
int | Layer (void) const |
int | Alpha (void) const |
bool | Tile (void) const |
const cRect & | ViewPort (void) const |
const cRect & | DrawPort (void) const |
const cRect & | DirtyViewPort (void) const |
const cRect & | DirtyDrawPort (void) const |
virtual void | SetLayer (int Layer) |
virtual void | SetAlpha (int Alpha) |
virtual void | SetTile (bool Tile) |
virtual void | SetViewPort (const cRect &Rect) |
virtual void | SetDrawPortPoint (const cPoint &Point, bool Dirty=true) |
virtual void | Clear (void)=0 |
virtual void | Fill (tColor Color)=0 |
virtual void | DrawImage (const cPoint &Point, const cImage &Image)=0 |
virtual void | DrawImage (const cPoint &Point, int ImageHandle)=0 |
virtual void | DrawPixel (const cPoint &Point, tColor Color)=0 |
virtual void | DrawBitmap (const cPoint &Point, const cBitmap &Bitmap, tColor ColorFg=0, tColor ColorBg=0, bool Overlay=false)=0 |
virtual void | DrawText (const cPoint &Point, const char *s, tColor ColorFg, tColor ColorBg, const cFont *Font, int Width=0, int Height=0, int Alignment=taDefault)=0 |
virtual void | DrawRectangle (const cRect &Rect, tColor Color)=0 |
virtual void | DrawEllipse (const cRect &Rect, tColor Color, int Quadrants=0)=0 |
virtual void | DrawSlope (const cRect &Rect, tColor Color, int Type)=0 |
virtual void | Render (const cPixmap *Pixmap, const cRect &Source, const cPoint &Dest)=0 |
virtual void | Copy (const cPixmap *Pixmap, const cRect &Source, const cPoint &Dest)=0 |
virtual void | Scroll (const cPoint &Dest, const cRect &Source=cRect::Null)=0 |
virtual void | Pan (const cPoint &Dest, const cRect &Source=cRect::Null)=0 |
cPixmap (void) | |
cPixmap (int Layer, const cRect &ViewPort, const cRect &DrawPort=cRect::Null) | |
int | Layer (void) const |
int | Alpha (void) const |
bool | Tile (void) const |
const cRect & | ViewPort (void) const |
const cRect & | DrawPort (void) const |
const cRect & | DirtyViewPort (void) const |
const cRect & | DirtyDrawPort (void) const |
virtual void | SetLayer (int Layer) |
virtual void | SetAlpha (int Alpha) |
virtual void | SetTile (bool Tile) |
virtual void | SetViewPort (const cRect &Rect) |
virtual void | SetDrawPortPoint (const cPoint &Point, bool Dirty=true) |
virtual void | Clear (void)=0 |
virtual void | Fill (tColor Color)=0 |
virtual void | DrawImage (const cPoint &Point, const cImage &Image)=0 |
virtual void | DrawImage (const cPoint &Point, int ImageHandle)=0 |
virtual void | DrawPixel (const cPoint &Point, tColor Color)=0 |
virtual void | DrawBitmap (const cPoint &Point, const cBitmap &Bitmap, tColor ColorFg=0, tColor ColorBg=0, bool Overlay=false)=0 |
virtual void | DrawText (const cPoint &Point, const char *s, tColor ColorFg, tColor ColorBg, const cFont *Font, int Width=0, int Height=0, int Alignment=taDefault)=0 |
virtual void | DrawRectangle (const cRect &Rect, tColor Color)=0 |
virtual void | DrawEllipse (const cRect &Rect, tColor Color, int Quadrants=0)=0 |
virtual void | DrawSlope (const cRect &Rect, tColor Color, int Type)=0 |
virtual void | Render (const cPixmap *Pixmap, const cRect &Source, const cPoint &Dest)=0 |
virtual void | Copy (const cPixmap *Pixmap, const cRect &Source, const cPoint &Dest)=0 |
virtual void | Scroll (const cPoint &Dest, const cRect &Source=cRect::Null)=0 |
virtual void | Pan (const cPoint &Dest, const cRect &Source=cRect::Null)=0 |
Static Public Member Functions | |
static void | Lock (void) |
static void | Unlock (void) |
static void | Lock (void) |
static void | Unlock (void) |
Protected Member Functions | |
virtual | ~cPixmap () |
void | MarkViewPortDirty (const cRect &Rect) |
void | MarkViewPortDirty (const cPoint &Point) |
void | MarkDrawPortDirty (const cRect &Rect) |
void | MarkDrawPortDirty (const cPoint &Point) |
void | SetClean (void) |
virtual void | DrawPixmap (const cPixmap *Pixmap, const cRect &Dirty) |
virtual | ~cPixmap () |
void | MarkViewPortDirty (const cRect &Rect) |
void | MarkViewPortDirty (const cPoint &Point) |
void | MarkDrawPortDirty (const cRect &Rect) |
void | MarkDrawPortDirty (const cPoint &Point) |
void | SetClean (void) |
virtual void | DrawPixmap (const cPixmap *Pixmap, const cRect &Dirty) |
Private Attributes | |
int | layer |
int | alpha |
bool | tile |
cRect | viewPort |
cRect | drawPort |
cRect | dirtyViewPort |
cRect | dirtyDrawPort |
Static Private Attributes | |
static cMutex | mutex |
Friends | |
class | cOsd |
class | cPixmapMutexLock |
Definition at line 450 of file include/vdr/osd.h.
|
inlineprotectedvirtual |
Definition at line 463 of file include/vdr/osd.h.
cPixmap::cPixmap | ( | void | ) |
cPixmap::cPixmap | ( | int | Layer, |
const cRect & | ViewPort, | ||
const cRect & | DrawPort = cRect::Null |
||
) |
Creates a pixmap in the given Layer.
When rendering the final OSD, pixmaps are handled in ascending order of their individual layer. This is important if pixmaps overlap each other. The one with the highest layer is rendered last. The actual value of Layer doesn't matter, it is only used for defining the rendering sequence. If Layer is less than zero, this pixmap will not be rendered into the final OSD (it can be activated by a later call to SetLayer()). The value 0 is reserved for the background pixmap and shall not be used otherwise (with the sole exception of temporarily using layer 0 to have a text with transparent background rendered with alpha blending into that pixmap; see also DrawPixel()). If there are several pixmaps with the same value of Layer, their rendering sequence within that layer is undefined. In order to allow devices that can handle only a limited number of layers, the Layer parameter must be less than 8 (MAXPIXMAPLAYERS). ViewPort defines the rectangle in which this pixmap will be rendered on the OSD. If no DrawPort is given, it defaults to the same size as the ViewPort, with its upper left corner set to (0, 0). All drawing operations will be executed relative to the origin of the DrawPort rectangle, and will be clipped to the size of this rectangle. The DrawPort may have a different size than the ViewPort. If it is smaller than the ViewPort, the rest of the ViewPort is treated as fully transparent (unless this is a tiled pixmap, in which case the DrawPort is repeated horizontally and vertically to fill the entire ViewPort). If the DrawPort is larger than the ViewPort, only that portion of the DrawPort that intersects with the ViewPort will be visible on the OSD. The drawing area of a newly created cPixmap is not initialized and may contain random data.
Definition at line 956 of file osd.c.
References alpha, ALPHA_OPAQUE, drawPort, esyslog, cRect::IsEmpty(), layer, Layer(), MAXPIXMAPLAYERS, cRect::SetPoint(), tile, viewPort, and ViewPort().
cPixmap::cPixmap | ( | void | ) |
cPixmap::cPixmap | ( | int | Layer, |
const cRect & | ViewPort, | ||
const cRect & | DrawPort = cRect::Null |
||
) |
Creates a pixmap in the given Layer.
When rendering the final OSD, pixmaps are handled in ascending order of their individual layer. This is important if pixmaps overlap each other. The one with the highest layer is rendered last. The actual value of Layer doesn't matter, it is only used for defining the rendering sequence. If Layer is less than zero, this pixmap will not be rendered into the final OSD (it can be activated by a later call to SetLayer()). The value 0 is reserved for the background pixmap and shall not be used otherwise (with the sole exception of temporarily using layer 0 to have a text with transparent background rendered with alpha blending into that pixmap; see also DrawPixel()). If there are several pixmaps with the same value of Layer, their rendering sequence within that layer is undefined. In order to allow devices that can handle only a limited number of layers, the Layer parameter must be less than 8 (MAXPIXMAPLAYERS). ViewPort defines the rectangle in which this pixmap will be rendered on the OSD. If no DrawPort is given, it defaults to the same size as the ViewPort, with its upper left corner set to (0, 0). All drawing operations will be executed relative to the origin of the DrawPort rectangle, and will be clipped to the size of this rectangle. The DrawPort may have a different size than the ViewPort. If it is smaller than the ViewPort, the rest of the ViewPort is treated as fully transparent (unless this is a tiled pixmap, in which case the DrawPort is repeated horizontally and vertically to fill the entire ViewPort). If the DrawPort is larger than the ViewPort, only that portion of the DrawPort that intersects with the ViewPort will be visible on the OSD. The drawing area of a newly created cPixmap is not initialized and may contain random data.
|
inline |
Definition at line 529 of file include/vdr/osd.h.
References alpha.
Referenced by cPixmapMemory::Render(), and SetAlpha().
|
pure virtual |
Clears the pixmap's draw port by setting all pixels to be fully transparent.
A derived class must call Lock()/Unlock().
Implemented in cPixmapMemory, and cPixmapMemory.
Referenced by cTrueColorDemo::Action(), cTrueColorDemo::CreateTextPixmap(), and cOsd::SetAreas().
|
pure virtual |
Clears the pixmap's draw port by setting all pixels to be fully transparent.
A derived class must call Lock()/Unlock().
Implemented in cPixmapMemory, and cPixmapMemory.
|
pure virtual |
Copies the part of the given Pixmap covered by Source into this pixmap at location Dest.
The Source rectangle is relative to the given Pixmap's draw port. The data from Pixmap is copied as is, no alpha handling of any kind takes place.
Implemented in cPixmapMemory, and cPixmapMemory.
Referenced by DrawPixmap(), and cOsd::RestoreRegion().
|
pure virtual |
Copies the part of the given Pixmap covered by Source into this pixmap at location Dest.
The Source rectangle is relative to the given Pixmap's draw port. The data from Pixmap is copied as is, no alpha handling of any kind takes place.
Implemented in cPixmapMemory, and cPixmapMemory.
|
inline |
Returns the "dirty" rectangle in the draw port of this this pixmap.
This is the surrounding rectangle around all pixels that have been modified since the last time this pixmap has been rendered to the OSD. The rectangle is relative to the draw port's origin. Since this function returns a reference to a data member, the caller must use Lock()/Unlock() to make sure the data doesn't change while it is used.
Definition at line 546 of file include/vdr/osd.h.
References dirtyDrawPort.
|
inline |
Returns the "dirty" rectangle in the draw port of this this pixmap.
This is the surrounding rectangle around all pixels that have been modified since the last time this pixmap has been rendered to the OSD. The rectangle is relative to the draw port's origin. Since this function returns a reference to a data member, the caller must use Lock()/Unlock() to make sure the data doesn't change while it is used.
Definition at line 546 of file osd.h.
References dirtyDrawPort.
|
inline |
Returns the "dirty" rectangle this pixmap causes on the OSD.
This is the surrounding rectangle around all pixels that have been modified since the last time this pixmap has been rendered to the OSD. The rectangle is relative to the OSD's origin. Since this function returns a reference to a data member, the caller must use Lock()/Unlock() to make sure the data doesn't change while it is used.
Definition at line 539 of file osd.h.
References dirtyViewPort.
|
inline |
Returns the "dirty" rectangle this pixmap causes on the OSD.
This is the surrounding rectangle around all pixels that have been modified since the last time this pixmap has been rendered to the OSD. The rectangle is relative to the OSD's origin. Since this function returns a reference to a data member, the caller must use Lock()/Unlock() to make sure the data doesn't change while it is used.
Definition at line 539 of file include/vdr/osd.h.
References dirtyViewPort.
Referenced by cOsd::RenderPixmaps().
|
pure virtual |
Sets the pixels in the OSD with the data from the given Bitmap, putting the upper left corner of the Bitmap at Point.
If ColorFg or ColorBg is given, the first palette entry of the Bitmap will be mapped to ColorBg and the second palette entry will be mapped to ColorFg (palette indexes are defined so that 0 is the background and 1 is the foreground color). If Overlay is true, any pixel in Bitmap that has color index 0 will not overwrite the corresponding pixel in the target area. This function is mainly for compatibility with skins or plugins that draw bitmaps onto the OSD.
Implemented in cPixmapMemory, and cPixmapMemory.
Referenced by cOsd::DrawBitmap().
|
pure virtual |
Sets the pixels in the OSD with the data from the given Bitmap, putting the upper left corner of the Bitmap at Point.
If ColorFg or ColorBg is given, the first palette entry of the Bitmap will be mapped to ColorBg and the second palette entry will be mapped to ColorFg (palette indexes are defined so that 0 is the background and 1 is the foreground color). If Overlay is true, any pixel in Bitmap that has color index 0 will not overwrite the corresponding pixel in the target area. This function is mainly for compatibility with skins or plugins that draw bitmaps onto the OSD.
Implemented in cPixmapMemory, and cPixmapMemory.
|
pure virtual |
Draws a filled ellipse with the given Color that fits into the given rectangle.
Quadrants controls which parts of the ellipse are actually drawn: 0 draws the entire ellipse 1..4 draws only the first, second, third or fourth quadrant, respectively 5..8 draws the right, top, left or bottom half, respectively -1..-8 draws the inverted part of the given quadrant(s) If Quadrants is not 0, the coordinates are those of the actual area, not the full circle!
Implemented in cPixmapMemory, and cPixmapMemory.
Referenced by cTrueColorDemo::Action(), and cOsd::DrawEllipse().
|
pure virtual |
Draws a filled ellipse with the given Color that fits into the given rectangle.
Quadrants controls which parts of the ellipse are actually drawn: 0 draws the entire ellipse 1..4 draws only the first, second, third or fourth quadrant, respectively 5..8 draws the right, top, left or bottom half, respectively -1..-8 draws the inverted part of the given quadrant(s) If Quadrants is not 0, the coordinates are those of the actual area, not the full circle!
Implemented in cPixmapMemory, and cPixmapMemory.
Draws the given Image into this pixmap at the given Point.
Implemented in cPixmapMemory, and cPixmapMemory.
Referenced by cOsd::DrawImage().
Draws the given Image into this pixmap at the given Point.
Implemented in cPixmapMemory, and cPixmapMemory.
|
pure virtual |
Draws the image referenced by the given ImageHandle into this pixmap at the given Point.
ImageHandle must be a value that has previously been returned by a call to cOsdProvider::StoreImage(). If ImageHandle has an invalid value, nothing happens.
Implemented in cPixmapMemory, and cPixmapMemory.
|
pure virtual |
Draws the image referenced by the given ImageHandle into this pixmap at the given Point.
ImageHandle must be a value that has previously been returned by a call to cOsdProvider::StoreImage(). If ImageHandle has an invalid value, nothing happens.
Implemented in cPixmapMemory, and cPixmapMemory.
Sets the pixel at the given Point to the given Color, which is a full 32 bit ARGB value.
If the alpha value of Color is not 0xFF (fully opaque), and this is the background pixmap (layer 0), the pixel is alpha blended with the existing color at the given position in this pixmap.
Implemented in cPixmapMemory, and cPixmapMemory.
Referenced by cOsd::DrawPixel(), and cFreetypeFont::DrawText().
Sets the pixel at the given Point to the given Color, which is a full 32 bit ARGB value.
If the alpha value of Color is not 0xFF (fully opaque), and this is the background pixmap (layer 0), the pixel is alpha blended with the existing color at the given position in this pixmap.
Implemented in cPixmapMemory, and cPixmapMemory.
Draws the Dirty part of the given Pixmap into this pixmap.
If the Pixmap's layer is 0, it is copied, otherwise it is rendered into this pixmap. This function is used only to implement the tile handling in the final rendering to the OSD.
Draws the Dirty part of the given Pixmap into this pixmap.
If the Pixmap's layer is 0, it is copied, otherwise it is rendered into this pixmap. This function is used only to implement the tile handling in the final rendering to the OSD.
Definition at line 1157 of file osd.c.
References cRect::Bottom(), Copy(), DrawPort(), cRect::Height(), cRect::Intersected(), cRect::IsEmpty(), Layer(), cRect::Left(), cRect::Point(), Render(), cRect::Right(), cRect::SetPoint(), cPoint::SetX(), cPoint::Shift(), cRect::Shift(), cPoint::Shifted(), cRect::Size(), Tile(), cRect::Top(), ViewPort(), cRect::Width(), cPoint::X(), and cPoint::Y().
Referenced by cOsd::RenderPixmaps().
|
inline |
|
inline |
Returns the pixmap's draw port, which is relative to the view port.
Since this function returns a reference to a data member, the caller must use Lock()/Unlock() to make sure the data doesn't change while it is used.
Definition at line 535 of file include/vdr/osd.h.
References drawPort.
Referenced by cTrueColorDemo::Action(), cPixmapMemory::Clear(), cPixmapMemory::Copy(), cPixmapMemory::cPixmapMemory(), cPixmapMemory::DrawBitmap(), cPixmapMemory::DrawImage(), cPixmapMemory::DrawPixel(), DrawPixmap(), cPixmapMemory::DrawRectangle(), cFreetypeFont::DrawText(), cPixmapMemory::Fill(), cPixmapMemory::Render(), cOsd::RenderPixmaps(), cOsd::RestoreRegion(), and cPixmapMemory::Scroll().
Draws a filled rectangle with the given Color.
Implemented in cPixmapMemory, and cPixmapMemory.
Draws a filled rectangle with the given Color.
Implemented in cPixmapMemory, and cPixmapMemory.
Referenced by cTrueColorDemo::Action(), and cOsd::DrawRectangle().
Draws a "slope" with the given Color into the given rectangle.
Type controls the direction of the slope and which side of it will be drawn: 0: horizontal, rising, lower 1: horizontal, rising, upper 2: horizontal, falling, lower 3: horizontal, falling, upper 4: vertical, rising, lower 5: vertical, rising, upper 6: vertical, falling, lower 7: vertical, falling, upper
Implemented in cPixmapMemory, and cPixmapMemory.
Draws a "slope" with the given Color into the given rectangle.
Type controls the direction of the slope and which side of it will be drawn: 0: horizontal, rising, lower 1: horizontal, rising, upper 2: horizontal, falling, lower 3: horizontal, falling, upper 4: vertical, rising, lower 5: vertical, rising, upper 6: vertical, falling, lower 7: vertical, falling, upper
Implemented in cPixmapMemory, and cPixmapMemory.
Referenced by cOsd::DrawSlope().
|
pure virtual |
Draws the given string at Point with the given foreground and background color and font.
If Width and Height are given, the text will be drawn into a rectangle with the given size and the given Alignment (default is top-left). If ColorBg is clrTransparent, no background pixels will be drawn, which allows drawing "transparent" text.
Implemented in cPixmapMemory, and cPixmapMemory.
Referenced by cTrueColorDemo::Action(), cTrueColorDemo::CreateTextPixmap(), and cOsd::DrawText().
|
pure virtual |
Draws the given string at Point with the given foreground and background color and font.
If Width and Height are given, the text will be drawn into a rectangle with the given size and the given Alignment (default is top-left). If ColorBg is clrTransparent, no background pixels will be drawn, which allows drawing "transparent" text.
Implemented in cPixmapMemory, and cPixmapMemory.
|
pure virtual |
Fills the pixmap's draw port with the given Color.
A derived class must call Lock()/Unlock().
Implemented in cPixmapMemory, and cPixmapMemory.
|
pure virtual |
Fills the pixmap's draw port with the given Color.
A derived class must call Lock()/Unlock().
Implemented in cPixmapMemory, and cPixmapMemory.
|
inline |
Definition at line 528 of file include/vdr/osd.h.
References layer.
Referenced by cPixmap(), cPixmapMemory::DrawPixel(), DrawPixmap(), cTrueColorDemo::ProcessKey(), cOsd::RenderPixmaps(), and SetLayer().
|
inlinestatic |
All public member functions of cPixmap set locks as necessary to make sure they are thread-safe (unless noted otherwise).
If several cPixmap member functions need to be called in a row, the caller must surround these calls with proper Lock()/Unlock() calls. See the LOCK_PIXMAPS macro for a convenient way of doing this.
Definition at line 521 of file osd.h.
References cMutex::Lock(), and mutex.
|
inlinestatic |
All public member functions of cPixmap set locks as necessary to make sure they are thread-safe (unless noted otherwise).
If several cPixmap member functions need to be called in a row, the caller must surround these calls with proper Lock()/Unlock() calls. See the LOCK_PIXMAPS macro for a convenient way of doing this.
Definition at line 521 of file include/vdr/osd.h.
References cMutex::Lock(), and mutex.
Referenced by cPixmapMemory::Clear(), cPixmapMemory::Copy(), cPixmapMemory::DrawBitmap(), cPixmapMemory::DrawEllipse(), cPixmapMemory::DrawImage(), cPixmapMemory::DrawPixel(), cPixmapMemory::DrawRectangle(), cPixmapMemory::DrawSlope(), cPixmapMemory::DrawText(), cPixmapMemory::Fill(), cPixmapMemory::Pan(), cPixmapMemory::Render(), cPixmapMemory::Scroll(), SetAlpha(), SetDrawPortPoint(), SetLayer(), SetTile(), and SetViewPort().
|
protected |
Marks the given rectangle of the draw port of this pixmap as dirty.
Rect is combined with the existing dirtyDrawPort rectangle. The coordinates of Rect are relative to the pixmap's draw port. If Rect extends into the currently visible view port of this pixmap, MarkViewPortDirty() is called with the appropriate value.
|
protected |
Marks the given rectangle of the draw port of this pixmap as dirty.
Rect is combined with the existing dirtyDrawPort rectangle. The coordinates of Rect are relative to the pixmap's draw port. If Rect extends into the currently visible view port of this pixmap, MarkViewPortDirty() is called with the appropriate value.
Definition at line 985 of file osd.c.
References cRect::Combine(), dirtyDrawPort, drawPort, cRect::Intersected(), MarkViewPortDirty(), cRect::Point(), cRect::Shifted(), tile, and viewPort.
Referenced by cPixmapMemory::Clear(), cPixmapMemory::Copy(), cPixmapMemory::DrawBitmap(), cPixmapMemory::DrawEllipse(), cPixmapMemory::DrawImage(), cPixmapMemory::DrawPixel(), cPixmapMemory::DrawRectangle(), cPixmapMemory::DrawSlope(), cPixmapMemory::DrawText(), cPixmapMemory::Fill(), cPixmapMemory::Render(), and cPixmapMemory::Scroll().
|
protected |
Marks the given point of the draw port of this pixmap as dirty.
Point is combined with the existing dirtyDrawPort rectangle. The coordinates of Point are relative to the pixmap's draw port. If Point is within the currently visible view port of this pixmap, MarkViewPortDirty() is called with the appropriate value.
Definition at line 994 of file osd.c.
References cRect::Combine(), cRect::Contains(), dirtyDrawPort, drawPort, MarkViewPortDirty(), cRect::Point(), cPoint::Shifted(), tile, and viewPort.
|
protected |
Marks the given point of the draw port of this pixmap as dirty.
Point is combined with the existing dirtyDrawPort rectangle. The coordinates of Point are relative to the pixmap's draw port. If Point is within the currently visible view port of this pixmap, MarkViewPortDirty() is called with the appropriate value.
|
protected |
Marks the given rectangle of the view port of this pixmap as dirty.
Rect is combined with the existing dirtyViewPort rectangle. The coordinates of Rect are given in absolute OSD values.
|
protected |
Marks the given rectangle of the view port of this pixmap as dirty.
Rect is combined with the existing dirtyViewPort rectangle. The coordinates of Rect are given in absolute OSD values.
Definition at line 974 of file osd.c.
References cRect::Combine(), dirtyViewPort, cRect::Intersected(), and viewPort.
Referenced by cOsd::DestroyPixmap(), MarkDrawPortDirty(), SetAlpha(), SetDrawPortPoint(), SetLayer(), SetTile(), and SetViewPort().
|
protected |
Marks the given point of the view port of this pixmap as dirty.
Point is combined with the existing dirtyViewPort rectangle. The coordinates of Point are given in absolute OSD values.
Definition at line 979 of file osd.c.
References cRect::Combine(), cRect::Contains(), dirtyViewPort, and viewPort.
|
protected |
Marks the given point of the view port of this pixmap as dirty.
Point is combined with the existing dirtyViewPort rectangle. The coordinates of Point are given in absolute OSD values.
|
pure virtual |
Does the same as Scroll(), but also shifts the draw port accordingly, so that the view port doesn't get dirty if the scrolled rectangle covers the entire view port.
This may be of advantage if, e.g., there is a draw port that holds, say, 11 lines of text, while the view port displays only 10 lines. By Pan()'ing the draw port up one line, an new bottom line can be written into the draw port (without being seen through the view port), and later the draw port can be shifted smoothly, resulting in a smooth scrolling. It is the caller's responsibility to make sure that Source and Dest are given in such a way that the view port will not get dirty. No check is done whether this condition actually holds true.
Implemented in cPixmapMemory, and cPixmapMemory.
Referenced by cTrueColorDemo::Action().
|
pure virtual |
Does the same as Scroll(), but also shifts the draw port accordingly, so that the view port doesn't get dirty if the scrolled rectangle covers the entire view port.
This may be of advantage if, e.g., there is a draw port that holds, say, 11 lines of text, while the view port displays only 10 lines. By Pan()'ing the draw port up one line, an new bottom line can be written into the draw port (without being seen through the view port), and later the draw port can be shifted smoothly, resulting in a smooth scrolling. It is the caller's responsibility to make sure that Source and Dest are given in such a way that the view port will not get dirty. No check is done whether this condition actually holds true.
Implemented in cPixmapMemory, and cPixmapMemory.
|
pure virtual |
Renders the part of the given Pixmap covered by Source into this pixmap at location Dest.
The Source rectangle is relative to the given Pixmap's draw port. The Pixmap's alpha value is to be used when rendering.
Implemented in cPixmapMemory, and cPixmapMemory.
|
pure virtual |
Renders the part of the given Pixmap covered by Source into this pixmap at location Dest.
The Source rectangle is relative to the given Pixmap's draw port. The Pixmap's alpha value is to be used when rendering.
Implemented in cPixmapMemory, and cPixmapMemory.
Referenced by DrawPixmap().
|
pure virtual |
Scrolls the data in the pixmap's draw port to the given Dest point.
If Source is given, only the data within that rectangle is scrolled. Source and Dest are relative to this pixmap's draw port.
Implemented in cPixmapMemory, and cPixmapMemory.
|
pure virtual |
Scrolls the data in the pixmap's draw port to the given Dest point.
If Source is given, only the data within that rectangle is scrolled. Source and Dest are relative to this pixmap's draw port.
Implemented in cPixmapMemory, and cPixmapMemory.
|
virtual |
Sets the alpha value of this pixmap to the given value.
Alpha is limited to the range 0 (fully transparent) to 255 (fully opaque). If a derived class reimplements this function, it needs to call the base class function.
|
virtual |
Sets the alpha value of this pixmap to the given value.
Alpha is limited to the range 0 (fully transparent) to 255 (fully opaque). If a derived class reimplements this function, it needs to call the base class function.
Definition at line 1025 of file osd.c.
References alpha, Alpha(), ALPHA_OPAQUE, ALPHA_TRANSPARENT, constrain(), Lock(), MarkViewPortDirty(), Unlock(), and viewPort.
Referenced by cTrueColorDemo::Action(), and cTrueColorDemo::CreateTextPixmap().
|
protected |
Resets the "dirty" rectangles of this pixmap.
|
protected |
Resets the "dirty" rectangles of this pixmap.
Definition at line 1005 of file osd.c.
References dirtyDrawPort, and dirtyViewPort.
Referenced by cOsd::RenderPixmaps().
|
virtual |
Sets the pixmap's draw port to the given Point.
Only the origin point of the draw port can be modified, its size is fixed. By default, setting a new draw port point results in marking the relevant part of the view port as "dirty". If Dirty is set to false, the view port will not be marked as dirty. This is mainly used to implement the Pan() function. If a derived class reimplements this function, it needs to call the base class function.
|
virtual |
Sets the pixmap's draw port to the given Point.
Only the origin point of the draw port can be modified, its size is fixed. By default, setting a new draw port point results in marking the relevant part of the view port as "dirty". If Dirty is set to false, the view port will not be marked as dirty. This is mainly used to implement the Pan() function. If a derived class reimplements this function, it needs to call the base class function.
Definition at line 1064 of file osd.c.
References drawPort, Lock(), MarkViewPortDirty(), cRect::Point(), cRect::SetPoint(), cRect::Shifted(), tile, Unlock(), and viewPort.
Referenced by cTrueColorDemo::Action(), and cPixmapMemory::Scroll().
|
virtual |
Sets the layer of this pixmap to the given value.
If the new layer is greater than zero, the pixmap will be visible. If it is less than zero, it will be invisible. A value of 0 will be silently ignored. If a derived class reimplements this function, it needs to call the base class function.
Definition at line 1010 of file osd.c.
References esyslog, layer, Layer(), Lock(), MarkViewPortDirty(), MAXPIXMAPLAYERS, Unlock(), and viewPort.
Referenced by cTrueColorDemo::Action(), and cTrueColorDemo::ProcessKey().
|
virtual |
Sets the layer of this pixmap to the given value.
If the new layer is greater than zero, the pixmap will be visible. If it is less than zero, it will be invisible. A value of 0 will be silently ignored. If a derived class reimplements this function, it needs to call the base class function.
|
virtual |
Sets the tile property of this pixmap to the given value.
If Tile is true, the pixmaps data will be repeated horizontally and vertically if necessary to fill the entire view port. If a derived class reimplements this function, it needs to call the base class function.
|
virtual |
Sets the tile property of this pixmap to the given value.
If Tile is true, the pixmaps data will be repeated horizontally and vertically if necessary to fill the entire view port. If a derived class reimplements this function, it needs to call the base class function.
Definition at line 1036 of file osd.c.
References drawPort, cRect::Height(), Lock(), MarkViewPortDirty(), cRect::Point(), tile, Tile(), Unlock(), viewPort, and cRect::Width().
Referenced by cTrueColorDemo::Action().
|
virtual |
Sets the pixmap's view port to the given Rect.
If a derived class reimplements this function, it needs to call the base class function.
|
virtual |
Sets the pixmap's view port to the given Rect.
If a derived class reimplements this function, it needs to call the base class function.
Definition at line 1047 of file osd.c.
References drawPort, Lock(), MarkViewPortDirty(), cRect::Point(), cRect::Shifted(), tile, Unlock(), and viewPort.
Referenced by cTrueColorDemo::Action().
|
inline |
Definition at line 530 of file include/vdr/osd.h.
References tile.
Referenced by DrawPixmap(), and SetTile().
|
inlinestatic |
Definition at line 527 of file include/vdr/osd.h.
References mutex, and cMutex::Unlock().
Referenced by cPixmapMemory::Clear(), cPixmapMemory::Copy(), cPixmapMemory::DrawBitmap(), cPixmapMemory::DrawEllipse(), cPixmapMemory::DrawImage(), cPixmapMemory::DrawPixel(), cPixmapMemory::DrawRectangle(), cPixmapMemory::DrawSlope(), cPixmapMemory::DrawText(), cPixmapMemory::Fill(), cPixmapMemory::Pan(), cPixmapMemory::Render(), cPixmapMemory::Scroll(), SetAlpha(), SetDrawPortPoint(), SetLayer(), SetTile(), and SetViewPort().
|
inlinestatic |
Definition at line 527 of file osd.h.
References mutex, and cMutex::Unlock().
|
inline |
Returns the pixmap's view port, which is relative to the OSD's origin.
Since this function returns a reference to a data member, the caller must use Lock()/Unlock() to make sure the data doesn't change while it is used.
Definition at line 531 of file include/vdr/osd.h.
References viewPort.
Referenced by cTrueColorDemo::Action(), cPixmap(), cOsd::DestroyPixmap(), DrawPixmap(), cOsd::RenderPixmaps(), and cOsd::RestoreRegion().
|
inline |
|
friend |
Definition at line 451 of file include/vdr/osd.h.
|
friend |
Definition at line 452 of file include/vdr/osd.h.
|
private |
Definition at line 456 of file include/vdr/osd.h.
Referenced by Alpha(), cPixmap(), and SetAlpha().
|
private |
Definition at line 461 of file include/vdr/osd.h.
Referenced by DirtyDrawPort(), MarkDrawPortDirty(), and SetClean().
|
private |
Definition at line 460 of file include/vdr/osd.h.
Referenced by DirtyViewPort(), MarkViewPortDirty(), and SetClean().
|
private |
Definition at line 459 of file include/vdr/osd.h.
Referenced by cPixmap(), DrawPort(), MarkDrawPortDirty(), SetDrawPortPoint(), SetTile(), and SetViewPort().
|
private |
Definition at line 455 of file include/vdr/osd.h.
Referenced by cPixmap(), Layer(), and SetLayer().
|
staticprivate |
Definition at line 454 of file include/vdr/osd.h.
|
private |
Definition at line 457 of file include/vdr/osd.h.
Referenced by cPixmap(), MarkDrawPortDirty(), SetDrawPortPoint(), SetTile(), SetViewPort(), and Tile().
|
private |
Definition at line 458 of file include/vdr/osd.h.
Referenced by cPixmap(), MarkDrawPortDirty(), MarkViewPortDirty(), SetAlpha(), SetDrawPortPoint(), SetLayer(), SetTile(), SetViewPort(), and ViewPort().