File tree Expand file tree Collapse file tree 2 files changed +11
-7
lines changed Expand file tree Collapse file tree 2 files changed +11
-7
lines changed Original file line number Diff line number Diff line change @@ -172,21 +172,23 @@ Color Image::GetPixel (uint16 x, uint16 y) const
172172
173173// //////////////////////////////////////////////////////////////////////////////
174174
175- void Image::SetPixel (const Point& point, Color c)
175+ void Image::SetPixel (const Point& point,
176+ const Color& color)
176177{
177- return SetPixel (point.X , point.Y , c );
178+ return SetPixel (point.X , point.Y , color );
178179}
179180
180181// //////////////////////////////////////////////////////////////////////////////
181182
182- void Image::SetPixel (uint16 x, uint16 y, Color c)
183+ void Image::SetPixel (uint16 x, uint16 y,
184+ const Color& color)
183185{
184186 // Perform simple boundary check
185187 if (x >= mWidth || y >= mHeight )
186188 return ;
187189
188- // Set color at the specified coordinate
189- ((Color*) mData ) [x + (y * mWidth )] = c ;
190+ // Set the color at the specified coordinate
191+ ((Color*) mData ) [x + (y * mWidth )] = color ;
190192}
191193
192194// //////////////////////////////////////////////////////////////////////////////
Original file line number Diff line number Diff line change @@ -55,8 +55,10 @@ class ROBOT_EXPORT Image
5555 Color GetPixel (const Point& point) const ;
5656 Color GetPixel (uint16 x, uint16 y) const ;
5757
58- void SetPixel (const Point& point, Color c);
59- void SetPixel (uint16 x, uint16 y, Color c);
58+ void SetPixel (const Point& point,
59+ const Color& color);
60+ void SetPixel (uint16 x, uint16 y,
61+ const Color& color);
6062
6163 bool Fill (const Color& color);
6264 bool Fill (uint8 r, uint8 g,
You can’t perform that action at this time.
0 commit comments