Skip to content

Conversation

@kvc0
Copy link

@kvc0 kvc0 commented May 9, 2020

vectorio builds on m4 express feather

Concrete shapes are composed into a VectorShape which is put into a displayio Group for display.

VectorShape provides transpose and x/y positioning for shape implementations.

Included Shapes:

  • Circle

    • A radius; Circle is positioned at its axis in the VectorShape.
    • You can freely modify the radius to grow and shrink the circle in-place.
  • Polygon

    • An ordered list of points.
    • Beteween each successive point an edge is inferred. A final edge closing the shape is inferred between the last
      point and the first point.
    • You can modify the points in a Polygon. The points' coordinate system is relative to (0, 0) so if you'd like a
      top-center justified 10x20 rectangle you can do points [(-5, 0), (5, 0), (5, 20), (-5, 20)] and your VectorShape
      x and y properties will position the rectangle relative to its top center point
  • Rectangle
    A width and a height.

kvc0 added 7 commits May 9, 2020 15:38
vectorio builds on m4 express feather

Concrete shapes are composed into a VectorShape which is put into a displayio Group for display.

VectorShape provides transpose and x/y positioning for shape implementations.

Included Shapes:

* Circle
  - A radius; Circle is positioned at its axis in the VectorShape.
  - You can freely modify the radius to grow and shrink the circle in-place.

* Polygon
  - An ordered list of points.
  - Beteween each successive point an edge is inferred.  A final edge closing the shape is inferred between the last
    point and the first point.
  - You can modify the points in a Polygon.  The points' coordinate system is relative to (0, 0) so if you'd like a
      top-center justified 10x20 rectangle you can do points [(-5, 0), (5, 0), (5, 20), (0, 20)] and your VectorShape
      x and y properties will position the rectangle relative to its top center point

* Rectangle
  A width and a height.
Rather than maintain a transform per-shape, we'll just use whatever
  settings are on the Display.  Currently only transpose is done.
VectorShape now just uses the Group's and Display's absolute transforms.
VectorShape tells the Group to redraw whatever it left behind when it is removed now.
* Fix drawing 1 pixel too large
* Need to pad dirty area to ensure removed shapes are fully removed
Copy link
Member

@tannewt tannewt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few questions. Lots for my brain to process. Thanks for this! It'll be a huge benefit for folks. Line might be nice to have too.

@siddacious
Copy link

I just wanted to chime in with some words of encouragement.

Thanks @WarriorOfWire! I'm excited to see this merged :)

tannewt
tannewt previously approved these changes May 12, 2020
Copy link
Member

@tannewt tannewt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this! I'll merge after I resolve the translation updates for you.

@tannewt
Copy link
Member

tannewt commented May 12, 2020

Oops, looks like I don't have permission to change your branch. Here is a PR into your branch: kvc0#1

Copy link
Member

@tannewt tannewt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@tannewt tannewt merged commit 75f9969 into adafruit:master May 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants