shoes / shoes3

a tiny graphical app kit for ruby
http://walkabout.mvmanila.com
Other
181 stars 19 forks source link

Shoes and Shoes Manual code samples #317

Closed IanTrudel closed 7 years ago

IanTrudel commented 7 years ago

Several methods are missing code samples in Shoes Manual.

Adding roughly 15 code samples to the Shoes Manual. See following commit.

IanTrudel commented 7 years ago

The short lived animated Shoes splash screen is back as a expert-curve-animation.rb sample. image

A slightly updated curve_to sample to display control points (as ovals) in simple-curve-control-points.rb. image

IanTrudel commented 7 years ago

Adding expert-curve-control-points.rb featuring fully interactive control points.

image

IanTrudel commented 7 years ago

The Shoes Manual on Shape refers to line_to, move_to, curve_to and arc_to but none of them are described in details, nothing about the parameters.

IanTrudel commented 7 years ago

Added good-path-animation.rb sample demonstrating how to create and follow a path with an animated object.

image

Going a little crazy? Also works. image

IanTrudel commented 7 years ago

to_pattern() method in both border and background has no code sample.

IanTrudel commented 7 years ago

@ccoupe I documented both to_pattern methods (background, border) but there is something fishy about it. Background and border are actually patterns, referring to them directly will return a pattern, so to_pattern is redundant. Shouldn't it be deprecate or removed from Shoes?

The only relevant to_pattern might be for Color since the class does not inherit from Pattern.

  cBackground = rb_define_class_under(cTypes, "Background", cPattern);
  cBorder = rb_define_class_under(cTypes, "Border", cPattern);