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

2D Geometry API for Draw #21

Open
s-celles opened this issue Aug 16, 2018 · 6 comments
Open

2D Geometry API for Draw #21

s-celles opened this issue Aug 16, 2018 · 6 comments

Comments

@s-celles
Copy link
Owner

s-celles commented Aug 16, 2018

An API to store x, y as UInt16 whatever coordinate type is given

Could help for REPL (to avoid changing type)

NexPoint or NxPoint (x y)
NxSize (w h)

Point{2, UInt16}()

@s-celles s-celles reopened this Aug 16, 2018
@s-celles
Copy link
Owner Author

s-celles commented Sep 1, 2018

Using GeometryTypes.jl it will be possible to do:

using GeometryTypes
cls(nexSerial)  # default backcolor = WHITE

draw(nexSerial, LineSegment(Point(0, 0), Point(lcd_width, lcd_height)), colour)
draw(nexSerial, LineSegment(Point(0, 0), Point(lcd_width, lcd_height)))  # default forecolor = BLACK

@s-celles
Copy link
Owner Author

s-celles commented Sep 1, 2018

draw(nexSerial, Rectangle(Vec(x1, y1), Vec(w, h)), color)
draw(nexSerial, Rectangle(Vec(x1, y1), Vec(w, h)), color, Background.SOLIDCOLOUR)

See JuliaGeometry/GeometryTypes.jl#149 for Rectangle construction possible improvements

@s-celles
Copy link
Owner Author

s-celles commented Sep 1, 2018

draw(nexSerial, Picture(picid), Point(x, y))
draw(nexSerial, Picture(picid), Rectangle(x, y, w, h))
draw(nexSerial, Picture(picid), Rectangle(x, y, w, h), Point(x0, y0))

@s-celles
Copy link
Owner Author

s-celles commented Sep 1, 2018

draw(nexSerial, Circle(Point(0, 0), 20), color)
draw(nexSerial, Circle(Point(0, 0), 20), color, Background.SOLIDCOLOUR)

@s-celles
Copy link
Owner Author

s-celles commented Sep 1, 2018

draw(nexSerial, "Hello", Rectangle(x, y, w, h), font, fontcolor, backcolor, xcenter, ycenter, sta)

ToDo:

@s-celles s-celles changed the title NexPoint API 2D Geometry API for Draw Sep 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant