Public Member Functions

nsDisplaySolidColor Class Reference

A simple display item that just renders a solid color across the specified bounds. More...

#include <nsDisplayList.h>

Inheritance diagram for nsDisplaySolidColor:
Collaboration diagram for nsDisplaySolidColor:

List of all members.

Public Member Functions

 nsDisplaySolidColor (nsIFrame *aFrame, const nsRect &aBounds, nscolor aColor)
virtual nsRect GetBounds (nsDisplayListBuilder *aBuilder)
 The default bounds is the frame border rect.
virtual PRBool IsOpaque (nsDisplayListBuilder *aBuilder)
virtual PRBool IsUniform (nsDisplayListBuilder *aBuilder)
virtual void Paint (nsDisplayListBuilder *aBuilder, nsIRenderingContext *aCtx)
 Actually paint this item to some rendering context.

Detailed Description

A simple display item that just renders a solid color across the specified bounds.

For canvas frames (in the CSS sense) we split off the drawing of the background color into this class (from nsDisplayBackground via nsDisplayCanvasBackground). This is done so that we can always draw a background color to avoid ugly flashes of white when we can't draw a full frame tree (ie when a page is loading). The bounds can differ from the frame's bounds -- this is needed when a frame/iframe is loading and there is not yet a frame tree to go in the frame/iframe so we use the subdoc frame of the parent document as a standin.


Constructor & Destructor Documentation

nsDisplaySolidColor::nsDisplaySolidColor ( nsIFrame *  aFrame,
const nsRect aBounds,
nscolor  aColor 
) [inline]

Member Function Documentation

virtual nsRect nsDisplaySolidColor::GetBounds ( nsDisplayListBuilder aBuilder  )  [inline, virtual]

The default bounds is the frame border rect.

Returns:
a rectangle relative to aBuilder->ReferenceFrame() that contains the area drawn by this display item

Reimplemented from nsDisplayItem.

virtual PRBool nsDisplaySolidColor::IsOpaque ( nsDisplayListBuilder aBuilder  )  [inline, virtual]
Returns:
PR_TRUE if the item is definitely opaque --- i.e., paints every pixel within its bounds opaquely

Reimplemented from nsDisplayItem.

virtual PRBool nsDisplaySolidColor::IsUniform ( nsDisplayListBuilder aBuilder  )  [inline, virtual]
Returns:
PR_TRUE if the item is guaranteed to paint every pixel in its bounds with the same (possibly translucent) color

Reimplemented from nsDisplayItem.

virtual void nsDisplaySolidColor::Paint ( nsDisplayListBuilder aBuilder,
nsIRenderingContext *  aCtx 
) [virtual]

Actually paint this item to some rendering context.

Content outside mVisibleRect need not be painted.

Reimplemented from nsDisplayItem.


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