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 ...@@ -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; backgroundColor = aColor;
} }
...@@ -449,7 +449,7 @@ void CAIRO_GAL::SetIsStroke( bool aIsStrokeEnabled ) ...@@ -449,7 +449,7 @@ void CAIRO_GAL::SetIsStroke( bool aIsStrokeEnabled )
} }
void CAIRO_GAL::SetStrokeColor( COLOR4D aColor ) void CAIRO_GAL::SetStrokeColor( const COLOR4D& aColor )
{ {
storePath(); storePath();
...@@ -468,7 +468,7 @@ void CAIRO_GAL::SetStrokeColor( COLOR4D aColor ) ...@@ -468,7 +468,7 @@ void CAIRO_GAL::SetStrokeColor( COLOR4D aColor )
} }
void CAIRO_GAL::SetFillColor( COLOR4D aColor ) void CAIRO_GAL::SetFillColor( const COLOR4D& aColor )
{ {
storePath(); storePath();
fillColor = aColor; fillColor = aColor;
......
...@@ -1440,7 +1440,7 @@ void OPENGL_GAL::DrawCurve( const VECTOR2D& aStartPoint, const VECTOR2D& aContro ...@@ -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; isSetAttributes = true;
strokeColor = aColor; strokeColor = aColor;
...@@ -1450,14 +1450,14 @@ void OPENGL_GAL::SetStrokeColor( COLOR4D 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; isSetAttributes = true;
fillColor = aColor; fillColor = aColor;
} }
void OPENGL_GAL::SetBackgroundColor( COLOR4D aColor ) void OPENGL_GAL::SetBackgroundColor( const COLOR4D& aColor )
{ {
isSetAttributes = true; isSetAttributes = true;
backgroundColor = aColor; backgroundColor = aColor;
......
...@@ -148,16 +148,16 @@ public: ...@@ -148,16 +148,16 @@ public:
virtual void SetIsStroke( bool aIsStrokeEnabled ); virtual void SetIsStroke( bool aIsStrokeEnabled );
/// @copydoc GAL::SetFillColor() /// @copydoc GAL::SetFillColor()
virtual void SetFillColor( COLOR4D aColor ); virtual void SetFillColor( const COLOR4D& aColor );
/// @copydoc GAL::SetStrokeColor() /// @copydoc GAL::SetStrokeColor()
virtual void SetStrokeColor( COLOR4D aColor ); virtual void SetStrokeColor( const COLOR4D& aColor );
/// @copydoc GAL::GetStrokeColor() /// @copydoc GAL::GetStrokeColor()
COLOR4D GetStrokeColor(); COLOR4D GetStrokeColor();
/// @copydoc GAL::SetBackgroundColor() /// @copydoc GAL::SetBackgroundColor()
virtual void SetBackgroundColor( COLOR4D aColor ); virtual void SetBackgroundColor( const COLOR4D& aColor );
/// @copydoc GAL::SetLineCap() /// @copydoc GAL::SetLineCap()
virtual void SetLineCap( LineCap aLineCap ); virtual void SetLineCap( LineCap aLineCap );
......
...@@ -219,7 +219,7 @@ public: ...@@ -219,7 +219,7 @@ public:
* *
* @param aColor is the color for filling. * @param aColor is the color for filling.
*/ */
inline virtual void SetFillColor( COLOR4D aColor ) inline virtual void SetFillColor( const COLOR4D& aColor )
{ {
fillColor = aColor; fillColor = aColor;
} }
...@@ -229,7 +229,7 @@ public: ...@@ -229,7 +229,7 @@ public:
* *
* @param aColor is the color for stroking the outline. * @param aColor is the color for stroking the outline.
*/ */
inline virtual void SetStrokeColor( COLOR4D aColor ) inline virtual void SetStrokeColor( const COLOR4D& aColor )
{ {
strokeColor = aColor; strokeColor = aColor;
} }
...@@ -249,7 +249,7 @@ public: ...@@ -249,7 +249,7 @@ public:
* *
* @param aColor is the color for background filling. * @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. * @brief Set the style of the line caps.
...@@ -569,7 +569,7 @@ public: ...@@ -569,7 +569,7 @@ public:
* *
* @param aGridColor is the grid color, it should have a low alpha value for the best effect. * @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; gridColor = aGridColor;
} }
...@@ -637,7 +637,7 @@ public: ...@@ -637,7 +637,7 @@ public:
* *
* @param aCursorColor is the color of the cursor. * @param aCursorColor is the color of the cursor.
*/ */
inline void SetCursorColor( COLOR4D aCursorColor ) inline void SetCursorColor( const COLOR4D& aCursorColor )
{ {
cursorColor = aCursorColor; cursorColor = aCursorColor;
} }
......
...@@ -164,16 +164,16 @@ public: ...@@ -164,16 +164,16 @@ public:
} }
/// @copydoc GAL::SetFillColor() /// @copydoc GAL::SetFillColor()
virtual void SetFillColor( COLOR4D aColor ); virtual void SetFillColor( const COLOR4D& aColor );
/// @copydoc GAL::SetStrokeColor() /// @copydoc GAL::SetStrokeColor()
virtual void SetStrokeColor( COLOR4D aColor ); virtual void SetStrokeColor( const COLOR4D& aColor );
/// @copydoc GAL::GetStrokeColor() /// @copydoc GAL::GetStrokeColor()
COLOR4D GetStrokeColor(); COLOR4D GetStrokeColor();
/// @copydoc GAL::SetBackgroundColor() /// @copydoc GAL::SetBackgroundColor()
virtual void SetBackgroundColor( COLOR4D aColor ); virtual void SetBackgroundColor( const COLOR4D& aColor );
/// @copydoc GAL::SetLineCap() /// @copydoc GAL::SetLineCap()
virtual void SetLineCap( LineCap aLineCap ) 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