Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing UI functions for X11 Window class #459

Open
ihhub opened this issue May 16, 2019 · 5 comments · May be fixed by #580
Open

Add missing UI functions for X11 Window class #459

ihhub opened this issue May 16, 2019 · 5 comments · May be fixed by #580
Labels
good first issue An issue is perfectly suitable for first comers. A very minimal knowledge of the project is required gui Graphical User Interface related issue. help wanted We need a help improvement Upgrade existing feature Linux Linux OS specific issue macOS macOS OS specific issue
Milestone

Comments

@ihhub
Copy link
Owner

ihhub commented May 16, 2019

We have an optional UI Window classes for image display and drawings. All of them locate in src/ui directory. Currently we support Qt, Win32 API and X11 frameworks. X11 code locates in src/ui/x11/x11_ui.h and src/ui/x11/x11_ui.cpp files. UiWindowX11 class does not have an implementation of following functions:

virtual void drawLine( const Point2d & start, const Point2d & end, const PaintColor & color );
virtual void drawEllipse( const Point2d & center, double xRadius, double yRadius, const PaintColor & color );
virtual void drawRectangle( const Point2d & topLeftCorner, double width, double height, const PaintColor & color );

We want to add them. You could have a look at Win32 or Qt implementation for reference of code implementation.

@ihhub ihhub added improvement Upgrade existing feature help wanted We need a help gui Graphical User Interface related issue. Linux Linux OS specific issue macOS macOS OS specific issue good first issue An issue is perfectly suitable for first comers. A very minimal knowledge of the project is required labels May 16, 2019
@ihhub ihhub added this to the Release milestone May 16, 2019
@MeKot
Copy link
Contributor

MeKot commented Aug 31, 2019

@ihhub Do you mind if I take this on?

@fullset
Copy link
Collaborator

fullset commented Nov 19, 2019

Hi, @MeKot.

Do you still want to work on this issue?

@ihhub
Copy link
Owner Author

ihhub commented Nov 19, 2019

hi @fullset , you could take this issue.

@fullset
Copy link
Collaborator

fullset commented Nov 20, 2019

@ihhub, OK. I'll take a look.

Maybe you have a quick answer to 1 question.

This string is present in x11_ui.cpp:

XDrawLine( _uiDisplay, _window, defaultGC, static_cast<int>(point.x - 1), static_cast<int>(point.y - 1),
            static_cast<int>(point.x + 1), static_cast<int>(point.y + 1) );

That's how the point is painted. Are there any reasons to use XDrawLine() and don not use XDrawPoint() for this?

@ihhub
Copy link
Owner Author

ihhub commented Nov 20, 2019

hi @fullset , it's done in a way to draw a cross (x) instead of dot as far as I remember. You could try to play around this and replace the code if you see the need in it. Remember that dot usually is something more than just one pixel as dots in computer vision applications are used to show edge points for example.

@fullset fullset linked a pull request Nov 21, 2019 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue An issue is perfectly suitable for first comers. A very minimal knowledge of the project is required gui Graphical User Interface related issue. help wanted We need a help improvement Upgrade existing feature Linux Linux OS specific issue macOS macOS OS specific issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants