LibreOffice Module sc (master) 1
Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
sc::SparklineRenderer Class Reference

Render a provided sparkline into the input rectangle. More...

#include <SparklineRenderer.hxx>

Collaboration diagram for sc::SparklineRenderer:
[legend]

Public Member Functions

 SparklineRenderer (ScDocument &rDocument)
 
void render (std::shared_ptr< sc::Sparkline > const &pSparkline, vcl::RenderContext &rRenderContext, tools::Rectangle const &rRectangle, tools::Long nOneX, tools::Long nOneY, double fScaleX, double fScaleY)
 

Private Member Functions

void createMarker (std::vector< SparklineMarker > &rMarkers, double x, double y, Color const &rColor)
 
void drawLine (vcl::RenderContext &rRenderContext, tools::Rectangle const &rRectangle, SparklineValues const &rSparklineValues, sc::SparklineAttributes const &rAttributes)
 
void drawColumn (vcl::RenderContext &rRenderContext, tools::Rectangle const &rRectangle, SparklineValues const &rSparklineValues, sc::SparklineAttributes const &rAttributes)
 
bool isCellHidden (ScAddress const &rAddress)
 

Static Private Member Functions

static void setFillAndLineColor (vcl::RenderContext &rRenderContext, sc::SparklineAttributes const &rAttributes, double nValue, size_t nValueIndex, SparklineValues const &rSparklineValues)
 

Private Attributes

ScDocumentmrDocument
 
tools::Long mnOneX
 
tools::Long mnOneY
 
double mfScaleX
 
double mfScaleY
 

Detailed Description

Render a provided sparkline into the input rectangle.

Definition at line 236 of file SparklineRenderer.hxx.

Constructor & Destructor Documentation

◆ SparklineRenderer()

sc::SparklineRenderer::SparklineRenderer ( ScDocument rDocument)
inline

Definition at line 484 of file SparklineRenderer.hxx.

Member Function Documentation

◆ createMarker()

void sc::SparklineRenderer::createMarker ( std::vector< SparklineMarker > &  rMarkers,
double  x,
double  y,
Color const &  rColor 
)
inlineprivate

Definition at line 246 of file SparklineRenderer.hxx.

References basegfx::utils::createPolygonFromRect(), mfScaleX, mfScaleY, mnOneX, mnOneY, x, and y.

Referenced by drawLine().

◆ drawColumn()

void sc::SparklineRenderer::drawColumn ( vcl::RenderContext rRenderContext,
tools::Rectangle const &  rRectangle,
SparklineValues const &  rSparklineValues,
sc::SparklineAttributes const &  rAttributes 
)
inlineprivate

◆ drawLine()

void sc::SparklineRenderer::drawLine ( vcl::RenderContext rRenderContext,
tools::Rectangle const &  rRectangle,
SparklineValues const &  rSparklineValues,
sc::SparklineAttributes const &  rAttributes 
)
inlineprivate

◆ isCellHidden()

bool sc::SparklineRenderer::isCellHidden ( ScAddress const &  rAddress)
inlineprivate

◆ render()

void sc::SparklineRenderer::render ( std::shared_ptr< sc::Sparkline > const &  pSparkline,
vcl::RenderContext rRenderContext,
tools::Rectangle const &  rRectangle,
tools::Long  nOneX,
tools::Long  nOneY,
double  fScaleX,
double  fScaleY 
)
inline

◆ setFillAndLineColor()

static void sc::SparklineRenderer::setFillAndLineColor ( vcl::RenderContext rRenderContext,
sc::SparklineAttributes const &  rAttributes,
double  nValue,
size_t  nValueIndex,
SparklineValues const &  rSparklineValues 
)
inlinestaticprivate

Member Data Documentation

◆ mfScaleX

double sc::SparklineRenderer::mfScaleX
private

Definition at line 243 of file SparklineRenderer.hxx.

Referenced by createMarker(), drawColumn(), drawLine(), and render().

◆ mfScaleY

double sc::SparklineRenderer::mfScaleY
private

Definition at line 244 of file SparklineRenderer.hxx.

Referenced by createMarker(), and render().

◆ mnOneX

tools::Long sc::SparklineRenderer::mnOneX
private

Definition at line 240 of file SparklineRenderer.hxx.

Referenced by createMarker(), and render().

◆ mnOneY

tools::Long sc::SparklineRenderer::mnOneY
private

Definition at line 241 of file SparklineRenderer.hxx.

Referenced by createMarker(), and render().

◆ mrDocument

ScDocument& sc::SparklineRenderer::mrDocument
private

Definition at line 239 of file SparklineRenderer.hxx.

Referenced by isCellHidden(), and render().


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