class Sketchup::RenderingOptions

The RenderingOptions class contains method to extract the rendering information for a model. The majority of the rendering information returned exists in the Styles dialog. The following rendering information keys are maintained in SketchUp:

Added in SketchUp 7:

Added in SketchUp 8:

Added in SketchUp 2014:

Added in SketchUp 2015:

Added in SketchUp 2018:

Removed in SketchUp 2019.1

Added in SketchUp 2020.0:

@version SketchUp 6.0

Constants

ROPAssign

Constants

ROPDrawHidden
ROPDrawHiddenGeometry
ROPDrawHiddenObjects
ROPEditComponent
ROPSectionDisplayTurnedOff
ROPSetBackgroundColor
ROPSetConstructionColor
ROPSetDepthQueEdges
ROPSetDepthQueWidth
ROPSetDisplayColorByLayer
ROPSetDisplayDims
ROPSetDisplayFog
ROPSetDisplayInstanceAxes
ROPSetDisplaySketchAxes
ROPSetDisplayText
ROPSetDisplayWatermarks
ROPSetDrawBackEdges
ROPSetDrawGround
ROPSetDrawHorizon
ROPSetDrawUnderground
ROPSetEdgeColorMode
ROPSetEdgeDisplayMode
ROPSetEdgeType
ROPSetExtendEdges
ROPSetExtendLines
ROPSetFaceColor
ROPSetFaceColorMode
ROPSetFogColor
ROPSetFogDist
ROPSetFogHint
ROPSetFogUseBkColor
ROPSetForegroundColor
ROPSetGroundColor
ROPSetGroundTransparency
ROPSetHideConstructionGeometry
ROPSetHighlightColor
ROPSetJitterEdges
ROPSetLineEndEdges
ROPSetLineEndWidth
ROPSetLineExtension
ROPSetLineStyleEdges
ROPSetLockedColor
ROPSetMaterialTransparency
ROPSetModelTransparency
ROPSetPhotomatchBackgroundOpacity
ROPSetPhotomatchDrawBackground
ROPSetPhotomatchDrawOverlay
ROPSetPhotomatchOverlayOpacity
ROPSetProfileEdges
ROPSetProfileWidth
ROPSetProfilesOnlyEdges
ROPSetRenderMode
ROPSetSectionActiveColor
ROPSetSectionCutFilled
ROPSetSectionCutWidth
ROPSetSectionDefaultCutColor
ROPSetSectionDefaultFillColor
ROPSetSectionDisplayMode
ROPSetSectionInactiveColor
ROPSetSkyColor
ROPSetTexture
ROPSetTransparencyObsolete
ROPSetXRayOpacity
ROPTransparencySortMethod

Public Class Methods

each_key() click to toggle source

The each_key method iterates through all of the rendering options keys.

@example

Sketchup.active_model.rendering_options.each_key { |key|
  puts key
}

@return [nil]

@version SketchUp 6.0

@yield [key] Variable to hold each key as they are found.

# File lib/sketchup-api-stubs/stubs/Sketchup/RenderingOptions.rb, line 177
def self.each_key
end
keys() click to toggle source

The keys method returns an array with all of the attribute keys.

@example

keys = Sketchup.active_model.rendering_options.keys

@return [Array<String>] an array of keys

@version SketchUp 6.0

# File lib/sketchup-api-stubs/stubs/Sketchup/RenderingOptions.rb, line 188
def self.keys
end

Public Instance Methods

[](key) click to toggle source

The {#[]} method is used to get the value of a rendering option.

@example

result = Sketchup.active_model.rendering_options["DisplayInstanceAxes"]

@param [String] key

The key of the rendering option value to get.

@return [Object, nil]

@version SketchUp 6.0

# File lib/sketchup-api-stubs/stubs/Sketchup/RenderingOptions.rb, line 204
def [](key)
end
[]=(key, value) click to toggle source

The set value []= method is used to set the value in the array of rendering options.

@example

Sketchup.active_model.rendering_options["DisplayInstanceAxes"] = false

@param [String] key

The key of the rendering option value to set.

@param [Object] value

The value to be set.

@return [Object] the value that was set

@version SketchUp 6.0

# File lib/sketchup-api-stubs/stubs/Sketchup/RenderingOptions.rb, line 222
def []=(key, value)
end
add_observer(observer) click to toggle source

The add_observer method is used to add an observer to the current object.

@example

observer = Sketchup::RenderingOptionsObserver.new # Dummy observer.
result = Sketchup.active_model.rendering_options.add_observer(observer)

@param [Object] observer

An observer.

@return [Boolean] true if successful, false if unsuccessful.

@version SketchUp 6.0

# File lib/sketchup-api-stubs/stubs/Sketchup/RenderingOptions.rb, line 237
def add_observer(observer)
end
count() click to toggle source

The {#count} method is inherited from the Enumerable mix-in module.

@example

options = Sketchup.active_model.rendering_options
number = options.count

@return [Integer]

@version SketchUp 2014

# File lib/sketchup-api-stubs/stubs/Sketchup/RenderingOptions.rb, line 249
def count
end
each() click to toggle source

The {#each} method iterates through all of the rendering options key/value pairs.

@example

Sketchup.active_model.rendering_options.each { |key, value|
  puts "#{key} : #{value}"
}

@return [nil]

@see each_pair

@version SketchUp 6.0

@yield [key, value]

@yieldparam [String] key

The key of each pair found.

@yieldparam [Object] value

The value of each pair found.
# File lib/sketchup-api-stubs/stubs/Sketchup/RenderingOptions.rb, line 273
def each
end
each_key() click to toggle source

The each_key method iterates through all of the rendering options keys.

@example

Sketchup.active_model.rendering_options.each_key { |key|
  puts key
}

@return [nil]

@version SketchUp 6.0

@yield [key] Variable to hold each key as they are found.

# File lib/sketchup-api-stubs/stubs/Sketchup/RenderingOptions.rb, line 288
def each_key
end
each_pair() click to toggle source

The {#each_pair} method is an alias for {#each}.

@example

Sketchup.active_model.rendering_options.each_pair { |key, value|
  puts "#{key} : #{value}"
}

@return [nil]

@see each

@version SketchUp 6.0

# File lib/sketchup-api-stubs/stubs/Sketchup/RenderingOptions.rb, line 303
def each_pair
end
keys() click to toggle source

The keys method returns an array with all of the attribute keys.

@example

keys = Sketchup.active_model.rendering_options.keys

@return [Array<String>] an array of keys

@version SketchUp 6.0

# File lib/sketchup-api-stubs/stubs/Sketchup/RenderingOptions.rb, line 314
def keys
end
length() click to toggle source

The {#length} method returns the number of options in the rendering options collection.

@example

options = Sketchup.active_model.rendering_options
number = options.length

@return [Integer]

@see size

@version SketchUp 2014

# File lib/sketchup-api-stubs/stubs/Sketchup/RenderingOptions.rb, line 329
def length
end
remove_observer(observer) click to toggle source

The remove_observer method is used to remove an observer from the current object.

@example

observer = Sketchup::RenderingOptionsObserver.new # Dummy observer.
options = Sketchup.active_model.rendering_options
options.add_observer(observer)
result = options.remove_observer(observer)

@param [Object] observer

An observer.

@return [Boolean] true if successful, false if unsuccessful.

@version SketchUp 6.0

# File lib/sketchup-api-stubs/stubs/Sketchup/RenderingOptions.rb, line 347
def remove_observer(observer)
end
size() click to toggle source

The {#size} method is an alias for {#length}.

@example

options = Sketchup.active_model.rendering_options
number = options.size

@return [Integer]

@see length

@version SketchUp 2014

# File lib/sketchup-api-stubs/stubs/Sketchup/RenderingOptions.rb, line 361
def size
end