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 drawing line or basic shapes method to Image #15

Closed
hajimehoshi opened this issue Dec 7, 2014 · 7 comments
Closed

Add drawing line or basic shapes method to Image #15

hajimehoshi opened this issue Dec 7, 2014 · 7 comments
Labels
Milestone

Comments

@hajimehoshi
Copy link
Owner

For debugging.

Ideally, it would be possible to develop a prototype without preparing images.

@hajimehoshi
Copy link
Owner Author

How about writing texts with an arcade font?

@hajimehoshi hajimehoshi changed the title Add drawing line or basic shapes method to Canvas Add drawing line or basic shapes method to Image Dec 22, 2014
@hajimehoshi hajimehoshi added this to the v1.1.0 milestone Dec 28, 2014
@hajimehoshi hajimehoshi modified the milestones: v1.1.0, v1.2.0 Jan 5, 2015
@hajimehoshi
Copy link
Owner Author

Let's use shaders to draw lines or circles!

@hajimehoshi
Copy link
Owner Author

Path methods:

  • BeginPath
  • ClosePath
  • MoveTo
  • LineTo
  • BezierCurveTo
  • QuadraticCurveTo
  • Arc
  • ArcTo
  • Ellipse
  • Rect
  • Clip?

Image methods:

  • FillPath
  • StrokePath (gl.LINE_STRIP)

@hajimehoshi
Copy link
Owner Author

It sounds nice if these are in exp (experimental) package.

@hajimehoshi
Copy link
Owner Author

It seems hard to implement filling in a polygon (especially on WebGL).

  • DrawPoints
  • DrawLines
  • DrawBezierCurves
  • DrawQuadraticCurves
  • DrawArcs
  • DrawPies
  • DrawEllipses
  • DrawRects
  • FillPies
  • FillEllipses
  • FillRects

How about cardinal spline?

@hajimehoshi
Copy link
Owner Author

Actually added:

  • DrawLine
  • DrawLines
  • DrawRect
  • DrawRects
  • FillRect
  • FillRects

I think that's enough so far for v1.2. I'll add other methods if required.

@hajimehoshi
Copy link
Owner Author

It seems hard to implement filling in a polygon (especially on WebGL).

NOTE: I found it's possible if I use stencil buffers. In this case, the filling algorithm would be even-odd.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant