Commit 08c54e8a authored by Maciej Suminski's avatar Maciej Suminski

Passing COLOR4D parameter using constant reference.

parent f7d85691
......@@ -413,7 +413,7 @@ void CAIRO_GAL::DrawCurve( const VECTOR2D& aStartPoint, const VECTOR2D& aControl
}
void CAIRO_GAL::SetBackgroundColor( COLOR4D aColor )
void CAIRO_GAL::SetBackgroundColor( const COLOR4D& aColor )
{
backgroundColor = aColor;
}
......@@ -449,7 +449,7 @@ void CAIRO_GAL::SetIsStroke( bool aIsStrokeEnabled )
}
void CAIRO_GAL::SetStrokeColor( COLOR4D aColor )
void CAIRO_GAL::SetStrokeColor( const COLOR4D& aColor )
{
storePath();
......@@ -468,7 +468,7 @@ void CAIRO_GAL::SetStrokeColor( COLOR4D aColor )
}
void CAIRO_GAL::SetFillColor( COLOR4D aColor )
void CAIRO_GAL::SetFillColor( const COLOR4D& aColor )
{
storePath();
fillColor = aColor;
......
......@@ -1440,7 +1440,7 @@ void OPENGL_GAL::DrawCurve( const VECTOR2D& aStartPoint, const VECTOR2D& aContro
}
void OPENGL_GAL::SetStrokeColor( COLOR4D aColor )
void OPENGL_GAL::SetStrokeColor( const COLOR4D& aColor )
{
isSetAttributes = true;
strokeColor = aColor;
......@@ -1450,14 +1450,14 @@ void OPENGL_GAL::SetStrokeColor( COLOR4D aColor )
}
void OPENGL_GAL::SetFillColor( COLOR4D aColor )
void OPENGL_GAL::SetFillColor( const COLOR4D& aColor )
{
isSetAttributes = true;
fillColor = aColor;
}
void OPENGL_GAL::SetBackgroundColor( COLOR4D aColor )
void OPENGL_GAL::SetBackgroundColor( const COLOR4D& aColor )
{
isSetAttributes = true;
backgroundColor = aColor;
......
......@@ -148,16 +148,16 @@ public:
virtual void SetIsStroke( bool aIsStrokeEnabled );
/// @copydoc GAL::SetFillColor()
virtual void SetFillColor( COLOR4D aColor );
virtual void SetFillColor( const COLOR4D& aColor );
/// @copydoc GAL::SetStrokeColor()
virtual void SetStrokeColor( COLOR4D aColor );
virtual void SetStrokeColor( const COLOR4D& aColor );
/// @copydoc GAL::GetStrokeColor()
COLOR4D GetStrokeColor();
/// @copydoc GAL::SetBackgroundColor()
virtual void SetBackgroundColor( COLOR4D aColor );
virtual void SetBackgroundColor( const COLOR4D& aColor );
/// @copydoc GAL::SetLineCap()
virtual void SetLineCap( LineCap aLineCap );
......
......@@ -219,7 +219,7 @@ public:
*
* @param aColor is the color for filling.
*/
inline virtual void SetFillColor( COLOR4D aColor )
inline virtual void SetFillColor( const COLOR4D& aColor )
{
fillColor = aColor;
}
......@@ -229,7 +229,7 @@ public:
*
* @param aColor is the color for stroking the outline.
*/
inline virtual void SetStrokeColor( COLOR4D aColor )
inline virtual void SetStrokeColor( const COLOR4D& aColor )
{
strokeColor = aColor;
}
......@@ -249,7 +249,7 @@ public:
*
* @param aColor is the color for background filling.
*/
virtual void SetBackgroundColor( COLOR4D aColor ) = 0;
virtual void SetBackgroundColor( const COLOR4D& aColor ) = 0;
/**
* @brief Set the style of the line caps.
......@@ -569,7 +569,7 @@ public:
*
* @param aGridColor is the grid color, it should have a low alpha value for the best effect.
*/
inline void SetGridColor( COLOR4D aGridColor )
inline void SetGridColor( const COLOR4D& aGridColor )
{
gridColor = aGridColor;
}
......@@ -637,7 +637,7 @@ public:
*
* @param aCursorColor is the color of the cursor.
*/
inline void SetCursorColor( COLOR4D aCursorColor )
inline void SetCursorColor( const COLOR4D& aCursorColor )
{
cursorColor = aCursorColor;
}
......
......@@ -164,16 +164,16 @@ public:
}
/// @copydoc GAL::SetFillColor()
virtual void SetFillColor( COLOR4D aColor );
virtual void SetFillColor( const COLOR4D& aColor );
/// @copydoc GAL::SetStrokeColor()
virtual void SetStrokeColor( COLOR4D aColor );
virtual void SetStrokeColor( const COLOR4D& aColor );
/// @copydoc GAL::GetStrokeColor()
COLOR4D GetStrokeColor();
/// @copydoc GAL::SetBackgroundColor()
virtual void SetBackgroundColor( COLOR4D aColor );
virtual void SetBackgroundColor( const COLOR4D& aColor );
/// @copydoc GAL::SetLineCap()
virtual void SetLineCap( LineCap aLineCap )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment