Skip to content

Commit

Permalink
Fix format
Browse files Browse the repository at this point in the history
  • Loading branch information
fullset committed Dec 20, 2019
1 parent a6bb503 commit ef72623
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 27 deletions.
4 changes: 2 additions & 2 deletions src/ui/x11/x11_ui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ void UiWindowX11::_display()
}

for ( size_t i = 0u; i < _lines.size(); ++i ) {
const Point2d & start = _lines[i].start;
const Point2d & start = _lines[i].start;
const Point2d & end = _lines[i].end;
const uint32_t & foreground = _lines[i].color;

Expand Down Expand Up @@ -141,7 +141,7 @@ void UiWindowX11::_setupImage( const PenguinV_Image::Image & image )

void UiWindowX11::drawPoint( const Point2d & point, const PaintColor & color )
{
_point.push_back( PointToDraw( point, (color.red << 16) + (color.green << 8) + color.blue ) );
_point.push_back( PointToDraw( point, ( color.red << 16 ) + ( color.green << 8 ) + color.blue ) );
}

void UiWindowX11::drawLine( const Point2d & start, const Point2d & end, const PaintColor & color )
Expand Down
46 changes: 21 additions & 25 deletions src/ui/x11/x11_ui.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,24 +32,22 @@ class UiWindowX11 : public UiWindow

struct PointToDraw
{
PointToDraw( const Point2d & point_ = Point2d(), uint32_t color_ = 0 )
PointToDraw( const Point2d & point_ = Point2d(), uint32_t color_ = 0 )
: point( point_ )
, color( color_ )
{
}
{}

Point2d point;
uint32_t color;
};

struct LineToDraw
{
LineToDraw( const Point2d & start_ = Point2d(), const Point2d & end_ = Point2d(), uint32_t color_ = 0 )
LineToDraw( const Point2d & start_ = Point2d(), const Point2d & end_ = Point2d(), uint32_t color_ = 0 )
: start( start_ )
, end ( end_ )
, end( end_ )
, color( color_ )
{
}
{}

Point2d start;
Point2d end;
Expand All @@ -58,13 +56,12 @@ class UiWindowX11 : public UiWindow

struct EllipseToDraw
{
EllipseToDraw( const Point2d& topLeft_ = Point2d(), double width_ = 0.0, double height_ = 0.0, uint32_t color_ = 0 )
: topLeft ( topLeft_ )
, width ( width_ )
, height ( height_ )
, color ( color_ )
{
}
EllipseToDraw( const Point2d & topLeft_ = Point2d(), double width_ = 0.0, double height_ = 0.0, uint32_t color_ = 0 )
: topLeft( topLeft_ )
, width( width_ )
, height( height_ )
, color( color_ )
{}

Point2d topLeft;
double width;
Expand All @@ -74,24 +71,23 @@ class UiWindowX11 : public UiWindow

struct RectangleToDraw
{
RectangleToDraw( const Point2d& topLeft_ = Point2d(), double width_ = 0.0, double height_ = 0.0, uint32_t color_ = 0 )
: topLeft ( topLeft_ )
, width ( width_ )
, height ( height_ )
, color ( color_ )
{
}
RectangleToDraw( const Point2d & topLeft_ = Point2d(), double width_ = 0.0, double height_ = 0.0, uint32_t color_ = 0 )
: topLeft( topLeft_ )
, width( width_ )
, height( height_ )
, color( color_ )
{}

Point2d topLeft;
double width;
double height;
uint32_t color;
};

std::vector < PointToDraw > _point;
std::vector < LineToDraw > _lines;
std::vector < EllipseToDraw > _ellipses;
std::vector < RectangleToDraw > _rectangles;
std::vector<PointToDraw> _point;
std::vector<LineToDraw> _lines;
std::vector<EllipseToDraw> _ellipses;
std::vector<RectangleToDraw> _rectangles;

void _setupImage( const PenguinV_Image::Image & image );
};
Expand Down

0 comments on commit ef72623

Please sign in to comment.