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

Can't modify gob/draw directly #3

Open
angerangel opened this issue Mar 18, 2013 · 2 comments
Open

Can't modify gob/draw directly #3

angerangel opened this issue Mar 18, 2013 · 2 comments
Labels

Comments

@angerangel
Copy link
Owner

GOB! type is for GUI, if you create a GUI element with draw or modify another gob/DRAW:

 a: make gob! [draw: [line 0x0 100x100]]
  view a

You'll obtain an error like:

 ** Script error: expected command! not line
@rebolek
Copy link

rebolek commented Mar 19, 2013

This is not a bug, DRAW expects block of commands, not a dialect.

@angerangel
Copy link
Owner Author

The original idea was different, see http://www.rebol.com/r3/docs/view/gobs.html
@carls idea was to access directly to /draw refinement of a gob, very similar to Rebol 2 way.

At the moment Boleslav Březovský proposed this solution with to-draw function:

>> gob: make gob! [draw: []]
== make gob! [offset: 0x0 size: 100x100 alpha: 0 draw: []]

>> to-draw [pen black fill-pen red circle 50x50 40] gob/draw
== [pen 0.0.0 fill-pen 255.0.0 circle 50x50 40x40]

>> view gob

But the best solution would be that view automatically passes the /draw content to to-draw or something similar.

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

2 participants