Passing COLOR4D parameter using constant reference.

This commit is contained in:
Maciej Suminski 2013-06-24 10:21:34 +02:00
parent f7d85691c2
commit 08c54e8acf
5 changed files with 17 additions and 17 deletions

View File

@ -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;

View File

@ -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;

View File

@ -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 );

View File

@ -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;
}

View File

@ -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 )