Implement Shoes::App#rotate method which rotates Oval and Rect elements... #224

Merged
merged 1 commit into from May 3, 2013

Conversation

Projects
None yet
2 participants
@ashbb
Member

ashbb commented Mar 29, 2013

... for now. Try out sample37.rb.

But I can't edit the spec to pass Travis CI. :(
So, please help me.

@@ -131,5 +131,9 @@ def default_styles
def font *family
family.empty? ? @font : @font = family.first
end
+
+ def rotate angle=nil
+ angle ? @rotate = angle : @rotate ||= 0

This comment has been minimized.

Show comment Hide comment
@plexus

plexus Mar 31, 2013

Member

The manual doesn't specify you can call rotate without an argument. Is that needed? If not then this would simplify to @rotate = angle... I would also be tempted to set @rotate = 0 in the constuctor.

@plexus

plexus Mar 31, 2013

Member

The manual doesn't specify you can call rotate without an argument. Is that needed? If not then this would simplify to @rotate = angle... I would also be tempted to set @rotate = 0 in the constuctor.

This comment has been minimized.

Show comment Hide comment
@ashbb

ashbb Apr 1, 2013

Member

You are right. But I used that in the lib/shoes/swt/oval.rb and lib/shoes/swt/rect.rb. Look at the changes.

@ashbb

ashbb Apr 1, 2013

Member

You are right. But I used that in the lib/shoes/swt/oval.rb and lib/shoes/swt/rect.rb. Look at the changes.

ashbb added a commit that referenced this pull request May 3, 2013

@ashbb ashbb merged commit 27fa63b into shoes:master May 3, 2013

1 check failed

default The Travis build failed
Details

ashbb added a commit that referenced this pull request May 8, 2013

Not a bug fix, just a workaround for sample24 and sample44. Refer to #…
…224. The Shoes::App#rotate method rotates only Oval and Rect elements for now.

@PragTob PragTob referenced this pull request May 11, 2014

Closed

The meaning of :angle #698

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment