Public Member Functions | Protected Member Functions | Properties

Romulus.Nes.NameTableRenderer Class Reference

Renders a name table to a bitmap. This class can be inherited to customize the renderer for a custom ScreenView. More...

List of all members.

Public Member Functions

 NameTableRenderer (SmallNameTable nametable, Bitmap target, Blitter blitter)
 Creates a new NameTableRenderer.
 NameTableRenderer ()
 Creates a new NameTableRenderer.
void RenderGdip (Graphics g)
 Renders a screen using GDI+. Because of GDI+ limitations this method performs poorly and.
void Render ()
 Renders the screen.
void Render (Action< Blitter > customRendering)
 Renders the screen, and allows execution of a custom post-rendering function.
void AddSprite (SpriteDef sprite, int x, int y, int basePal)
 Adds a composite sprite to the renderers sprite list.

Protected Member Functions

virtual void OnAfterRender ()
 Override this method for post-processing in a derived class.
virtual void RenderSprites (Blitter b)
 Renders sprites.
virtual void RenderBg (Blitter b)
 Override to add additional logic.

Properties

SmallNameTable NameTable [get, set]
 Gets the NameTable associated with this renderer.
Blitter Blitter [get, set]
 Gets the Blitter associated with this renderer.
Bitmap BgPatterns [get, set]
 Gets/sets the background patterns the renderer will use.
Bitmap SpritePatterns [get, set]
 Gets/sets the sprite patterns the renderer will use.
Bitmap OutputBitmap [get, set]
 Gets the Bitmap that will be rendered to.
List< SpriteTileSprites [get, set]
 Gets a list that specifies sprites to be drawn.

Detailed Description

Renders a name table to a bitmap. This class can be inherited to customize the renderer for a custom ScreenView.


Constructor & Destructor Documentation

Romulus.Nes.NameTableRenderer.NameTableRenderer ( SmallNameTable  nametable,
Bitmap  target,
Blitter  blitter 
)

Creates a new NameTableRenderer.

Parameters:
nametable The nametable to render. If null, the renderer will create a new nametable.
target The bitmap to render to (must be 256, 256). If null, the renderer will create a new bitmap for the render target.
blitter The blitter to use for rendering. If null, the renderer will use its own blitter.
Romulus.Nes.NameTableRenderer.NameTableRenderer (  ) 

Creates a new NameTableRenderer.


Member Function Documentation

void Romulus.Nes.NameTableRenderer.AddSprite ( SpriteDef  sprite,
int  x,
int  y,
int  basePal 
)

Adds a composite sprite to the renderers sprite list.

Parameters:
sprite The sprite to add.
x The X location to draw the sprite to.
y The Y location to draw the sprite to.
basePal The base palette, added to each individual tile's palette number.
virtual void Romulus.Nes.NameTableRenderer.OnAfterRender (  )  [protected, virtual]

Override this method for post-processing in a derived class.

void Romulus.Nes.NameTableRenderer.Render (  ) 

Renders the screen.

void Romulus.Nes.NameTableRenderer.Render ( Action< Blitter customRendering  ) 

Renders the screen, and allows execution of a custom post-rendering function.

Parameters:
customRendering An action to perform after rendering the nametable.
virtual void Romulus.Nes.NameTableRenderer.RenderBg ( Blitter  b  )  [protected, virtual]

Override to add additional logic.

Parameters:
b Blitter used to render BG.
void Romulus.Nes.NameTableRenderer.RenderGdip ( Graphics  g  ) 

Renders a screen using GDI+. Because of GDI+ limitations this method performs poorly and.

may produce different output than normal rendering methods.

Parameters:
g Graphics object with which to render.

This function has bad performance and may produce incomplete or incorrect results.

virtual void Romulus.Nes.NameTableRenderer.RenderSprites ( Blitter  b  )  [protected, virtual]

Renders sprites.

Parameters:
b The blitter object

Property Documentation

Bitmap Romulus.Nes.NameTableRenderer.BgPatterns [get, set]

Gets/sets the background patterns the renderer will use.

Blitter Romulus.Nes.NameTableRenderer.Blitter [get, set]

Gets the Blitter associated with this renderer.

SmallNameTable Romulus.Nes.NameTableRenderer.NameTable [get, set]

Gets the NameTable associated with this renderer.

Bitmap Romulus.Nes.NameTableRenderer.OutputBitmap [get, set]

Gets the Bitmap that will be rendered to.

Bitmap Romulus.Nes.NameTableRenderer.SpritePatterns [get, set]

Gets/sets the sprite patterns the renderer will use.

List<SpriteTile> Romulus.Nes.NameTableRenderer.Sprites [get, set]

Gets a list that specifies sprites to be drawn.


The documentation for this class was generated from the following file:
 All Classes Namespaces Functions Variables Enumerations Properties Events