VIEW_OVERLAY: add Get[Fill/Stroke]Color methods.

This commit is contained in:
Tomasz Wlostowski 2021-05-31 00:15:16 +02:00
parent 0da85ded2f
commit 2b955437b6
2 changed files with 8 additions and 1 deletions

View File

@ -393,12 +393,14 @@ void VIEW_OVERLAY::SetIsStroke( bool aIsStrokeEnabled )
void VIEW_OVERLAY::SetFillColor( const COLOR4D& aColor )
{
m_fillColor = aColor;
m_commands.push_back( new COMMAND_SET_COLOR( false, aColor ) );
}
void VIEW_OVERLAY::SetStrokeColor( const COLOR4D& aColor )
{
m_strokeColor = aColor;
m_commands.push_back( new COMMAND_SET_COLOR( true, aColor ) );
}

View File

@ -98,12 +98,17 @@ public:
void SetFillColor( const COLOR4D& aColor );
void SetStrokeColor( const COLOR4D& aColor );
void SetGlyphSize( const VECTOR2D aSize );
void SetLineWidth( double aLineWidth );
const COLOR4D& GetStrokeColor() const { return m_strokeColor; }
const COLOR4D& GetFillColor() const { return m_fillColor; }
private:
void releaseCommands();
COLOR4D m_strokeColor;
COLOR4D m_fillColor;
std::vector<COMMAND*> m_commands;
};