-
Notifications
You must be signed in to change notification settings - Fork 10
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
Improve support for shapes #10
Comments
I wanted to look into this, but I found out this functionality is already implemented. Did I miss something, or should this be closed? |
Right now there is support for drawing a shape with What's missing somewhat of making an explicit shape object that represent a shape. In Processing they create a PShape object (P for Processing - it took me a while to figure out what the P stood for) with The overview of how it works is here: The list of methods is here: Take a look and see if you are interested in adding a Shape class to Sketching. FWIW the code that handles the current shape operations are here: [1]
|
I am currently looking into it and I have not done much OOP in Racket. But I'll give it a shot and try to figure it out. |
I have a very basic and feature-missing, but running, version now. I found some problems with the Processing API VS. Sketching. In Processing for example the shape constructor is overloaded with a parameter for the default shapes like RECT and ELLIPSE, plus some extra arguments for the position, based on the basic shape that's provided. I'd like to split this up into different functions, like Also I put a draw method inside the shape class, because Are those changes okay, or should I stay as close to Processing as possible? Edit: |
On the other hand staying close to P. means that it is easier to port examples to Sketching. In this case I think we can do both :-) If you have functions Giving Wrt to getting the Shape class seen inside a Let's say you have a file "shape.rkt" which contains the |
Improve support for shapes.
createShape, loadShape, PShape, shape and shapeMode
The text was updated successfully, but these errors were encountered: