Class: Sketchup::HatchPatternData
| Relationships | |
| Inherits: | Object |
Overview
A HatchPatternData object holds the appearance settings of a hatch pattern detached
from any named HatchPattern in the model. It is used to read and write the default
section fill style stored in RenderingOptions#hatch_pattern.
The object returned by RenderingOptions#hatch_pattern is frozen, since it is a snapshot detached from the model. Mutate a #dup of it (or a new instance) and assign it back to apply a change.
Class Method Summary
- .new ⇒ Sketchup::HatchPatternData constructor
Instance Attribute Summary
- #fill_color ⇒ Sketchup::Color rw
- #fill_color=(color) rw
-
#rotation_angle ⇒ Float
rw
The rotation angle is in degrees.
-
#rotation_angle=(angle)
rw
The rotation angle is in degrees.
Instance Method Summary
-
#==(other) ⇒ Boolean
Two
HatchPatternDataobjects are equal when all their settings match. - #clear_fill_pattern ⇒ Sketchup::HatchPatternData
- #clear_fill_texture ⇒ Sketchup::HatchPatternData
-
#dup ⇒ Sketchup::HatchPatternData
The #dup method creates a copy of the
HatchPatternDatawith all its properties. - #fill_pattern_file_name ⇒ String
- #fill_texture_file_name ⇒ String
- #fill_texture_image ⇒ Sketchup::ImageRep?
- #save_fill_pattern_to_file(file_name) ⇒ Sketchup::HatchPatternData
- #set_fill_pattern_from_file(file_name) ⇒ Sketchup::HatchPatternData
-
#set_fill_texture_image_and_file_name(image, file_name) ⇒ Sketchup::HatchPatternData
The image and the file path it came from are set together, as a unit.
-
#set_uv_scale(u_scale, v_scale) ⇒ Sketchup::HatchPatternData
Both values must be positive.
-
#uv_scale ⇒ Array(Float, Float)
The scale is a factor applied to the pattern's repeat; it is not a percentage.
Constructor Details
.new ⇒ HatchPatternData
Instance Attribute Details
#fill_color ⇒ Sketchup::Color (rw)
#fill_color=(color) (rw)
#rotation_angle ⇒ Float (rw)
The rotation angle is in degrees.
#rotation_angle=(angle) (rw)
The rotation angle is in degrees.
Instance Method Details
#==(other) ⇒ Boolean
Two HatchPatternData objects are equal when all their settings match.
#clear_fill_pattern ⇒ HatchPatternData
#clear_fill_texture ⇒ HatchPatternData
#dup ⇒ HatchPatternData
The #dup method creates a copy of the HatchPatternData with all its properties.
#fill_pattern_file_name ⇒ String
#fill_texture_file_name ⇒ String
#fill_texture_image ⇒ Sketchup::ImageRep?
#save_fill_pattern_to_file(file_name) ⇒ HatchPatternData
#set_fill_pattern_from_file(file_name) ⇒ HatchPatternData
A .pat file may hold more than one pattern definition. Only the first definition in the file is loaded; any others are ignored.
#set_fill_texture_image_and_file_name(image, file_name) ⇒ HatchPatternData
The image and the file path it came from are set together, as a unit.
#set_uv_scale(u_scale, v_scale) ⇒ HatchPatternData
Both values must be positive.
#uv_scale ⇒ Array(Float, Float)
The scale is a factor applied to the pattern's repeat; it is not a percentage.