# IRsPaintRenderer Struct Reference

Inherits IUnknown.

List of all members.

## Public Member Functions
HRESULT | Render ([in] IUnknown *pDevice)
HRESULT | Begin ()
HRESULT | End ()
HRESULT | Reset ()
HRESULT | AddPoint ([in] const RtUVcoord &pt)
HRESULT | SetShape ([in] IRdBitmap *pShape)
HRESULT | SetColor ([in] RtDWORD color)
HRESULT | SetSize ([in] RtFloat size)
HRESULT | Validate ([in] IUnknown *pDevice)
HRESULT | SetViewportData ([in] const RtUVcoord &pan,[in] RtFloat zoom,[in] RtFloat aspect)
HRESULT | OnReset ()

## Detailed Description

Preview for brush paint tool.

- Renders the brush dots along drag line when active.
- Drag line points are progressively added.

## Member Function Documentation

HRESULT IRsPaintRenderer::Render | ( | [in] IUnknown * | pDevice | ) |

Renders the preview to specified device.

Parameters:

  | pDevice | [in] DirectX device (IDirect3DDevice9)

HRESULT IRsPaintRenderer::Begin | ( |  | ) |

Enables preview rendering.

HRESULT IRsPaintRenderer::End | ( |  | ) |

Disables preview rendering

HRESULT IRsPaintRenderer::Reset | ( |  | ) |

Clears the drag line

HRESULT IRsPaintRenderer::AddPoint | ( | [in] const RtUVcoord & | pt | ) |

Adds new point at the end of drag line.

- Point is in normalized view coordinates (0,0->1,1).

Parameters:

  | pt | [in] New point.

HRESULT IRsPaintRenderer::SetShape | ( | [in] IRdBitmap * | pShape | ) |

Sets the brush bitmap to use (takes alpha channel into account).

Parameters:

  | pShape | [in] Set the brush bitmap.

HRESULT IRsPaintRenderer::SetColor | ( | [in] RtDWORD | color | ) |

Sets the color of brush.

Parameters:

  | color | [in] Set color of brush (format=0xAARRGGBB).

HRESULT IRsPaintRenderer::SetSize | ( | [in] RtFloat | size | ) |

Sets the brush size.

Parameters:

  | size | [in] Set brush size.

HRESULT IRsPaintRenderer::Validate | ( | [in] IUnknown * | pDevice | ) |

Creates brush texture from brush bitmap to allow rendering.

Parameters:

  | pDevice | [in] Create brush texture.

HRESULT IRsPaintRenderer::SetViewportData | ( | [in] const RtUVcoord & | pan,
|  | [in] RtFloat | zoom,
|  | [in] RtFloat | aspect |
| ) |  |  |

Sets up current viewport.

Parameters:

  | pan | [in] .
  | zoom | [in] .
  | aspect | [in] .

HRESULT IRsPaintRenderer::OnReset | ( |  | ) |

Releases brush texture when device has been reset. It will be rebuilt in next validate cycle.