Class: Sketchup::RenderingOptions

Inherits:
Entity
  • Object
show all
Includes:
Enumerable
Defined in:
lib/sketchup-api-stubs/stubs/Sketchup/RenderingOptions.rb

Overview

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:

  • BackgroundColor

  • BandColor

  • ConstructionColor

  • DepthQueWidth

  • DisplayColorByLayer

  • DisplayFog

  • DisplayInstanceAxes

  • DisplayWatermarks

  • DrawDepthQue

  • DrawGround

  • DrawHidden

  • DrawHorizon

  • DrawLineEnds

  • DrawProfilesOnly

  • DrawSilhouettes

  • DrawUnderground

  • EdgeColorMode

  • EdgeDisplayMode

  • EdgeType

  • ExtendLines

  • FaceBackColor

  • FaceFrontColor

  • FogColor

  • FogEndDist

  • FogStartDist

  • FogUseBkColor

  • ForegroundColor

  • GroundColor

  • GroundTransparency

  • HideConstructionGeometry

  • HighlightColor

  • HorizonColor

  • InactiveHidden

  • InstanceHidden

  • JitterEdges

  • LineEndWidth

  • LineExtension

  • LockedColor

  • MaterialTransparency

  • ModelTransparency

  • RenderMode

  • SectionActiveColor

  • SectionCutWidth

  • SectionDefaultCutColor

  • SectionInactiveColor

  • ShowViewName

  • SilhouetteWidth

  • SkyColor

  • Texture

  • TransparencySort SketchUp 2017 treats Medium transparency as Faster.

Added in SketchUp 7:

  • DisplayDims

  • DisplaySketchAxes

  • DisplayText

Added in SketchUp 8:

  • InactiveFade

  • InstanceFade

Added in SketchUp 2014:

  • DisplaySectionPlanes

Added in SketchUp 2015:

  • DisplaySectionCuts

  • DrawBackEdges

  • SectionCutDrawEdges

Added in SketchUp 2018:

  • SectionCutFilled

  • SectionDefaultFillColor

Removed in SketchUp 2019.1

  • FaceColorMode This option was previously included but it was ineffective.

Added in SketchUp 2020.0:

  • ROPDrawHiddenGeometry

  • ROPDrawHiddenObjects

Version:

  • SketchUp 6.0

Constant Summary collapse

ROPAssign =

Constants

nil
ROPDrawHidden =

Stub value.

nil
ROPDrawHiddenGeometry =

Stub value.

nil
ROPDrawHiddenObjects =

Stub value.

nil
ROPEditComponent =

Stub value.

nil
ROPSectionDisplayTurnedOff =

Stub value.

nil
ROPSetBackgroundColor =

Stub value.

nil
ROPSetConstructionColor =

Stub value.

nil
ROPSetDepthQueEdges =

Stub value.

nil
ROPSetDepthQueWidth =

Stub value.

nil
ROPSetDisplayColorByLayer =

Stub value.

nil
ROPSetDisplayDims =

Stub value.

nil
ROPSetDisplayFog =

Stub value.

nil
ROPSetDisplayInstanceAxes =

Stub value.

nil
ROPSetDisplaySketchAxes =

Stub value.

nil
ROPSetDisplayText =

Stub value.

nil
ROPSetDisplayWatermarks =

Stub value.

nil
ROPSetDrawBackEdges =

Stub value.

nil
ROPSetDrawGround =

Stub value.

nil
ROPSetDrawHorizon =

Stub value.

nil
ROPSetDrawUnderground =

Stub value.

nil
ROPSetEdgeColorMode =

Stub value.

nil
ROPSetEdgeDisplayMode =

Stub value.

nil
ROPSetEdgeType =

Stub value.

nil
ROPSetExtendEdges =

Stub value.

nil
ROPSetExtendLines =

Stub value.

nil
ROPSetFaceColor =

Stub value.

nil
ROPSetFaceColorMode =

Stub value.

nil
ROPSetFogColor =

Stub value.

nil
ROPSetFogDist =

Stub value.

nil
ROPSetFogHint =

Stub value.

nil
ROPSetFogUseBkColor =

Stub value.

nil
ROPSetForegroundColor =

Stub value.

nil
ROPSetGroundColor =

Stub value.

nil
ROPSetGroundTransparency =

Stub value.

nil
ROPSetHideConstructionGeometry =

Stub value.

nil
ROPSetHighlightColor =

Stub value.

nil
ROPSetJitterEdges =

Stub value.

nil
ROPSetLineEndEdges =

Stub value.

nil
ROPSetLineEndWidth =

Stub value.

nil
ROPSetLineExtension =

Stub value.

nil
ROPSetLineStyleEdges =

Stub value.

nil
ROPSetLockedColor =

Stub value.

nil
ROPSetMaterialTransparency =

Stub value.

nil
ROPSetModelTransparency =

Stub value.

nil
ROPSetPhotomatchBackgroundOpacity =

Stub value.

nil
ROPSetPhotomatchDrawBackground =

Stub value.

nil
ROPSetPhotomatchDrawOverlay =

Stub value.

nil
ROPSetPhotomatchOverlayOpacity =

Stub value.

nil
ROPSetProfileEdges =

Stub value.

nil
ROPSetProfileWidth =

Stub value.

nil
ROPSetProfilesOnlyEdges =

Stub value.

nil
ROPSetRenderMode =

Stub value.

nil
ROPSetSectionActiveColor =

Stub value.

nil
ROPSetSectionCutFilled =

Stub value.

nil
ROPSetSectionCutWidth =

Stub value.

nil
ROPSetSectionDefaultCutColor =

Stub value.

nil
ROPSetSectionDefaultFillColor =

Stub value.

nil
ROPSetSectionDisplayMode =

Stub value.

nil
ROPSetSectionInactiveColor =

Stub value.

nil
ROPSetSkyColor =

Stub value.

nil
ROPSetTexture =

Stub value.

nil
ROPSetTransparencyObsolete =

Stub value.

nil
ROPSetXRayOpacity =

Stub value.

nil
ROPTransparencySortMethod =

Stub value.

nil

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Entity

#attribute_dictionaries, #attribute_dictionary, #delete_attribute, #deleted?, #entityID, #get_attribute, #inspect, #model, #parent, #persistent_id, #set_attribute, #to_s, #typename, #valid?

Class Method Details

.each_key {|key| ... } ⇒ nil

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

Examples:

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

Yields:

  • (key)

    Variable to hold each key as they are found.

Returns:

  • (nil)

Version:

  • SketchUp 6.0



177
178
# File 'lib/sketchup-api-stubs/stubs/Sketchup/RenderingOptions.rb', line 177

def self.each_key
end

.keysArray<String>

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

Examples:

keys = Sketchup.active_model.rendering_options.keys

Returns:

Version:

  • SketchUp 6.0



188
189
# File 'lib/sketchup-api-stubs/stubs/Sketchup/RenderingOptions.rb', line 188

def self.keys
end

Instance Method Details

#[](key) ⇒ Object?

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

Examples:

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

Parameters:

  • key (String)

    The key of the rendering option value to get.

Returns:

  • (Object, nil)

Version:

  • SketchUp 6.0



204
205
# File 'lib/sketchup-api-stubs/stubs/Sketchup/RenderingOptions.rb', line 204

def [](key)
end

#[]=(key, value) ⇒ Object

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

Examples:

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

Parameters:

  • key (String)

    The key of the rendering option value to set.

  • value (Object)

    The value to be set.

Returns:

  • (Object)

    the value that was set

Version:

  • SketchUp 6.0



222
223
# File 'lib/sketchup-api-stubs/stubs/Sketchup/RenderingOptions.rb', line 222

def []=(key, value)
end

#add_observer(observer) ⇒ Boolean

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

Examples:

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

Parameters:

  • observer (Object)

    An observer.

Returns:

  • (Boolean)

    true if successful, false if unsuccessful.

Version:

  • SketchUp 6.0



237
238
# File 'lib/sketchup-api-stubs/stubs/Sketchup/RenderingOptions.rb', line 237

def add_observer(observer)
end

#countInteger

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

Examples:

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

Returns:

  • (Integer)

Version:

  • SketchUp 2014



249
250
# File 'lib/sketchup-api-stubs/stubs/Sketchup/RenderingOptions.rb', line 249

def count
end

#each {|key, value| ... } ⇒ nil

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

Examples:

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

Yields:

  • (key, value)

Yield Parameters:

  • key (String)

    The key of each pair found.

  • value (Object)

    The value of each pair found.

Returns:

  • (nil)

See Also:

Version:

  • SketchUp 6.0



273
274
# File 'lib/sketchup-api-stubs/stubs/Sketchup/RenderingOptions.rb', line 273

def each
end

#each_key {|key| ... } ⇒ nil

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

Examples:

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

Yields:

  • (key)

    Variable to hold each key as they are found.

Returns:

  • (nil)

Version:

  • SketchUp 6.0



288
289
# File 'lib/sketchup-api-stubs/stubs/Sketchup/RenderingOptions.rb', line 288

def each_key
end

#each_pairnil

The #each_pair method is an alias for #each.

Examples:

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

Returns:

  • (nil)

See Also:

Version:

  • SketchUp 6.0



303
304
# File 'lib/sketchup-api-stubs/stubs/Sketchup/RenderingOptions.rb', line 303

def each_pair
end

#keysArray<String>

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

Returns:

Version:

  • SketchUp 6.0



314
315
# File 'lib/sketchup-api-stubs/stubs/Sketchup/RenderingOptions.rb', line 314

def keys
end

#lengthInteger

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

Examples:

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

Returns:

  • (Integer)

See Also:

Version:

  • SketchUp 2014



329
330
# File 'lib/sketchup-api-stubs/stubs/Sketchup/RenderingOptions.rb', line 329

def length
end

#remove_observer(observer) ⇒ Boolean

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

Examples:

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

Parameters:

  • observer (Object)

    An observer.

Returns:

  • (Boolean)

    true if successful, false if unsuccessful.

Version:

  • SketchUp 6.0



347
348
# File 'lib/sketchup-api-stubs/stubs/Sketchup/RenderingOptions.rb', line 347

def remove_observer(observer)
end

#sizeInteger

The #size method is an alias for #length.

Examples:

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

Returns:

  • (Integer)

See Also:

Version:

  • SketchUp 2014



361
362
# File 'lib/sketchup-api-stubs/stubs/Sketchup/RenderingOptions.rb', line 361

def size
end