Class: Sketchup::HatchPattern
Overview
An HatchPattern object represents an hatch pattern in the model.
Instance Method Summary # collapse
-
#clear_fill_pattern ⇒ Sketchup::HatchPattern
The #clear_fill_pattern method removes the .pat line-pattern definition from the HatchPattern.
-
#clear_fill_texture ⇒ Sketchup::HatchPattern
The #clear_fill_texture method removes the texture fill from the HatchPattern.
-
#fill_color ⇒ Sketchup::Color
The #fill_color method retrieves the solid fill color of the HatchPattern.
-
#fill_color=(color) ⇒ Object
The #fill_color= method sets the solid fill color of the HatchPattern.
-
#fill_pattern_file_name ⇒ String
The #fill_pattern_file_name method retrieves the file path the .pat line-pattern definition was loaded from.
-
#fill_texture_file_name ⇒ String
The #fill_texture_file_name method retrieves the file path the fill texture image was loaded from.
-
#fill_texture_image ⇒ Sketchup::ImageRep?
The #fill_texture_image method retrieves the fill texture image of the HatchPattern, or
nilif the pattern has no texture fill. -
#name ⇒ String
The #name method retrieves the name of the HatchPattern.
-
#name=(name) ⇒ Object
The #name= method sets the name for an HatchPattern.
-
#rotation_angle ⇒ Float
The #rotation_angle method retrieves the rotation angle applied to the HatchPattern, in degrees.
-
#rotation_angle=(angle) ⇒ Object
The #rotation_angle= method sets the rotation angle applied to the HatchPattern, in degrees.
-
#save_fill_pattern_to_file(file_name) ⇒ Sketchup::HatchPattern
The #save_fill_pattern_to_file method writes the .pat line-pattern definition to a file.
-
#set_fill_pattern_from_file(file_name) ⇒ Sketchup::HatchPattern
The #set_fill_pattern_from_file method loads a .pat line-pattern definition from a file.
-
#set_fill_texture_image_and_file_name(image, file_name) ⇒ Sketchup::HatchPattern
The #set_fill_texture_image_and_file_name method sets the fill texture image and the file path it came from together, as a unit.
-
#set_uv_scale(u_scale, v_scale) ⇒ Sketchup::HatchPattern
The #set_uv_scale method sets the UV scale of the HatchPattern.
-
#thumbnail_image ⇒ Sketchup::ImageRep
The #thumbnail_image method retrieves the cached preview image of the HatchPattern.
-
#uv_scale ⇒ Array(Float, Float)
The #uv_scale method retrieves the UV scale of the HatchPattern as a
uandvpair. -
#write(path) ⇒ Boolean
Writes the hatch pattern to file as a .skh file.
Methods inherited from Entity
#add_observer, #attribute_dictionaries, #attribute_dictionary, #delete_attribute, #deleted?, #entityID, #get_attribute, #inspect, #model, #parent, #persistent_id, #remove_observer, #set_attribute, #to_s, #typename, #valid?
Instance Method Details
↑ #clear_fill_pattern ⇒ Sketchup::HatchPattern
The #clear_fill_pattern method removes the .pat line-pattern definition from the Sketchup::HatchPattern.
↑ #clear_fill_texture ⇒ Sketchup::HatchPattern
The #clear_fill_texture method removes the texture fill from the Sketchup::HatchPattern.
↑ #fill_color ⇒ Sketchup::Color
The #fill_color method retrieves the solid fill color of the Sketchup::HatchPattern.
↑ #fill_color=(color) ⇒ Object
The #fill_color= method sets the solid fill color of the Sketchup::HatchPattern.
↑ #fill_pattern_file_name ⇒ String
The #fill_pattern_file_name method retrieves the file path the .pat line-pattern definition was loaded from.
↑ #fill_texture_file_name ⇒ String
The #fill_texture_file_name method retrieves the file path the fill texture image was loaded from.
↑ #fill_texture_image ⇒ Sketchup::ImageRep?
The #fill_texture_image method retrieves the fill texture image of the Sketchup::HatchPattern, or nil if the pattern has no texture fill.
↑ #name ⇒ String
The #name method retrieves the name of the Sketchup::HatchPattern.
↑ #name=(name) ⇒ Object
The #name= method sets the name for an Sketchup::HatchPattern. The name must be non-empty and unique within the model.
↑ #rotation_angle ⇒ Float
The #rotation_angle method retrieves the rotation angle applied to the Sketchup::HatchPattern, in degrees.
↑ #rotation_angle=(angle) ⇒ Object
The #rotation_angle= method sets the rotation angle applied to the Sketchup::HatchPattern, in degrees.
↑ #save_fill_pattern_to_file(file_name) ⇒ Sketchup::HatchPattern
The #save_fill_pattern_to_file method writes the .pat line-pattern definition to a file. This writes only the pattern definition, not the whole hatch pattern; use #write for the latter.
↑ #set_fill_pattern_from_file(file_name) ⇒ Sketchup::HatchPattern
A .pat file may hold more than one pattern definition. Only the first definition in
The #set_fill_pattern_from_file method loads a .pat line-pattern definition from a file.
the file is loaded; any others are ignored.
↑ #set_fill_texture_image_and_file_name(image, file_name) ⇒ Sketchup::HatchPattern
The #set_fill_texture_image_and_file_name method sets the fill texture image and the file path it came from together, as a unit.
↑ #set_uv_scale(u_scale, v_scale) ⇒ Sketchup::HatchPattern
The #set_uv_scale method sets the UV scale of the Sketchup::HatchPattern. Both values must be positive. The scale is a factor applied to the pattern’s repeat; it is not a percentage.
↑ #thumbnail_image ⇒ Sketchup::ImageRep
The #thumbnail_image method retrieves the cached preview image of the Sketchup::HatchPattern.
↑ #uv_scale ⇒ Array(Float, Float)
The #uv_scale method retrieves the UV scale of the Sketchup::HatchPattern as a u and v pair. The scale is a positive factor applied to the pattern’s repeat; it is not a percentage.
↑ #write(path) ⇒ Boolean
Writes the hatch pattern to file as a .skh file.