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

undocumented dash style/method #244

Closed
passenger94 opened this issue Apr 17, 2016 · 7 comments
Closed

undocumented dash style/method #244

passenger94 opened this issue Apr 17, 2016 · 7 comments
Milestone

Comments

@passenger94
Copy link
Contributor

!!!

Shoes.app do
    stack left: 50, top: 50, width: 400, height: 400 do
        border brown, strokewidth: 5, dash: :onedot

        line 0,200,400,200, dash: :onedot, stroke: green, strokewidth: 3
        oval 200,150,150,50, center: true, fill: orange, dash: :onedot, stroke: red, strokewidth: 3
        shape left: 200, top: 250, fill: orange, dash: :onedot, stroke: red, strokewidth: 3 do
            move_to -175,0
            line_to 125, -30; line_to 10,50; line_to -175,0
        end
    end
end

dashes

Probably WIP as there is only one variant :onedot if i don't miss something ...

@ccoupe
Copy link

ccoupe commented Apr 17, 2016

It's still true -- Nobody knows Shoes~

@dredknight
Copy link
Contributor

dredknight commented Mar 10, 2017

The manual for this one will be pretty short as it only supports one option :onedot.
Is there a way to see what options are available for styles? for example

para "Shoes", align: "center" 

align can also be "left" and "right" but how do I find this (except from the manual)?
Is there a command to see all available options for shoes elements styles and options?

One funny thing is that besides the shapes above :onedot is also available for arrow.
The difference is almost unnoticeable. Probably because the arrow length/thick ratio is too small.
Unless there is a way to set arrow length independently of the width, :onedot is useless for that element.

P.S. My bad it works for arrow and rectangle. You just need to set the fill to a colour different than black.

Shoes.app do
   arrow(40, 40, 60)
   arrow(40, 120, 60,dash: :onedot, fill: green)
end

@IanTrudel
Copy link
Collaborator

The manual for this one will be pretty short as it only supports one option :onedot.

:onedot and :nodot are supported according to the C source code.

Is there a way to see what options are available for styles?
align can also be "left" and "right" but how do I find this (except from the manual)?
Is there a command to see all available options for shoes elements styles and options?

This is the purpose of the manual, amongst other things.

Styles are defined at C level without Ruby/Shoes counterpart. Shoes has no way to know about styles. They are literally parsed as you can see here: https://github.com/Shoes3/shoes3/blob/master/shoes/ruby.c#L2776

One funny thing is that besides the shapes above :onedot is also available for arrow. The difference is almost unnoticeable.

This is a good catch. One would wonder why arrow cannot be of different length. Perhaps opening an issue about arrow length would be advisable.

dredknight added a commit that referenced this issue Mar 12, 2017
Can be found under Shoes -> Styles -> after Curve and before
Displace_top.
Note: In v3.3.3 serach engine dash result is duplicated.
dredknight added a commit that referenced this issue Mar 12, 2017
somehow spaces got duplicated while comminiting.
@dredknight
Copy link
Contributor

Pushed the final version of Dash to the master. Let me know if anything should be changed. Otherwise we can close this one.

@dredknight
Copy link
Contributor

Sorry for the formatting errors :(

@IanTrudel
Copy link
Collaborator

No worries, @dredknight! Your help is very much appreciated. :)

@dredknight dredknight added this to the 3.3.3 milestone Mar 13, 2017
@dredknight
Copy link
Contributor

:)

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

4 participants