Class: Sketchup::View

Inherits:
Object show all
Defined in:
lib/view.rb

Instance Method Summary collapse

Instance Method Details

#add_observer(view_observer) ⇒ Boolean

Attach a Sketchup::ViewObserver to the View

Parameters:

Returns:

  • (Boolean)

    true if successful, false if not



8
9
# File 'lib/view.rb', line 8

def add_observer(view_observer)
end

#animation=(animation) ⇒ Object



11
12
# File 'lib/view.rb', line 11

def animation=(animation)
end

#average_refresh_timeObject



14
15
# File 'lib/view.rb', line 14

def average_refresh_time
end

#cameraCamera

Returns a reference to the Camera

Returns:



21
22
# File 'lib/view.rb', line 21

def camera
end

#camera=(camera) ⇒ Object



24
25
# File 'lib/view.rb', line 24

def camera=(camera)
end

#centerObject



26
27
# File 'lib/view.rb', line 26

def center
end

#corner(index) ⇒ Object



28
29
# File 'lib/view.rb', line 28

def corner(index)
end

#draw(mode, *points) ⇒ Object



30
31
# File 'lib/view.rb', line 30

def draw(mode, *points)
end

#draw2d(opengl_primitive, *points) ⇒ View

Used to draw temporary geometry on the screen rather than 3d space.

Object.constants.grep(/GL_/).sort ["GL_LINES", "GL_LINE_LOOP", "GL_LINE_STRIP", "GL_POINTS", "GL_POLYGON", "GL_QUADS", "GL_QUAD_STRIP", "GL_TRIANGLES", "GL_TRIANGLE_FAN", "GL_TRIANGLE_STRIP"]

Examples:

view.draw2d(GL_POINTS, [ [0, 0], [1, 0], [1, 1], [0, 1] ])

Parameters:

  • opengl_primitive

    Ruby Constant mapped to an OpenGL primitive type.

  • points (Array)

    An Array of 2d screen coordinates in pixels.

Returns:

  • (View)

    the View



47
48
# File 'lib/view.rb', line 47

def draw2d(opengl_primitive, *points)
end

#draw_line(*args) ⇒ Object



49
50
# File 'lib/view.rb', line 49

def draw_line(*args)
end

#draw_lines(*args) ⇒ Object



51
52
# File 'lib/view.rb', line 51

def draw_lines(*args)
end

#draw_points(points, size, style, color) ⇒ Object



53
54
# File 'lib/view.rb', line 53

def draw_points(points, size, style, color)
end

#draw_polyline(*args) ⇒ Object



55
56
# File 'lib/view.rb', line 55

def draw_polyline(*args)
end

#draw_text(point, text) ⇒ View #draw_text(point, text, opts = {}) ⇒ View

Overloads:

  • #draw_text(point, text) ⇒ View

    Parameters:

    • point (Point3d)
    • text (String)

    Since:

    • SketchUp 6

  • #draw_text(point, text, opts = {}) ⇒ View

    Parameters:

    • point (Point3d)
    • text (String)
    • opts (Hash) (defaults to: {})

    Options Hash (opts):

    • :font_name (String)

      The name of the font to use. If it does not # exist on the system, a default font will be used instead.

    • :font_size (Integer)

      The size of the font in points

    • :bold (Boolean)

      Controls the Bold property of the font.

    • :italic (Boolean)

      Controls the Italic property of the font.

    • :color (Color)

      The color to draw the text with.

    • :align (Integer)

      The text alignment, one of the following: TextAlignLeft, TextAlignCenter or TextAlignRight.

    Since:

    • SketchUp 2016

Returns:



77
78
# File 'lib/view.rb', line 77

def draw_text(point, string, options_hash)
end

#drawing_color=(color) ⇒ Object



80
81
# File 'lib/view.rb', line 80

def drawing_color=(color)
end

#dynamic=(boolean) ⇒ Object



82
83
# File 'lib/view.rb', line 82

def dynamic=(boolean)
end

#field_of_viewObject



84
85
# File 'lib/view.rb', line 84

def field_of_view
end

#field_of_view=(fov) ⇒ Object



86
87
# File 'lib/view.rb', line 86

def field_of_view=(fov)
end

#guess_targetObject



88
89
# File 'lib/view.rb', line 88

def guess_target
end

#inference_locked?Boolean

Returns:

  • (Boolean)


90
91
# File 'lib/view.rb', line 90

def inference_locked?
end

#inputpoint(x, y, inputpoint = nil) ⇒ Object



92
93
# File 'lib/view.rb', line 92

def inputpoint(x, y, inputpoint = nil)
end

#invalidateObject



94
95
# File 'lib/view.rb', line 94

def invalidate
end

#last_refresh_timeObject



96
97
# File 'lib/view.rb', line 96

def last_refresh_time
end

#line_stipple=(pattern) ⇒ Object



98
99
# File 'lib/view.rb', line 98

def line_stipple=(pattern)
end

#line_width=(pixel_width) ⇒ Object



100
101
# File 'lib/view.rb', line 100

def line_width=(pixel_width)
end

#lock_inference(inputpoint1 = nil, inputpoint2 = nil) ⇒ Object



102
103
# File 'lib/view.rb', line 102

def lock_inference(inputpoint1 = nil, inputpoint2 = nil)
end

#modelObject



104
105
# File 'lib/view.rb', line 104

def model
end

#pick_helper(x = nil, y = nil, aperture = nil) ⇒ Sketchup::PickHelper



107
108
# File 'lib/view.rb', line 107

def pick_helper(x = nil, y = nil, aperture = nil)
end

#pickray(x = nil, y = nil) ⇒ Object



109
110
# File 'lib/view.rb', line 109

def pickray(x = nil, y = nil)
end

#pixels_to_model(pixel_size, point) ⇒ Object



111
112
# File 'lib/view.rb', line 111

def pixels_to_model(pixel_size, point)
end

#remove_observer(observer) ⇒ Object



113
114
# File 'lib/view.rb', line 113

def remove_observer(observer)
end

#screen_coords(point) ⇒ Object



115
116
# File 'lib/view.rb', line 115

def screen_coords(point)
end

#set_color_from_line(point1, point2) ⇒ Object



117
118
# File 'lib/view.rb', line 117

def set_color_from_line(point1, point2)
end

#show_frame(delay = 0) ⇒ Object



119
120
# File 'lib/view.rb', line 119

def show_frame(delay = 0)
end

#tooltip=(string) ⇒ Object



121
122
# File 'lib/view.rb', line 121

def tooltip=(string)
end

#vpheightObject



123
124
# File 'lib/view.rb', line 123

def vpheight
end

#vpwidthObject



125
126
# File 'lib/view.rb', line 125

def vpwidth
end

#write_image(filename_or_hash, width = nil, height = nil, antialias = nil, compression = nil) ⇒ Object



127
128
# File 'lib/view.rb', line 127

def write_image(filename_or_hash, width = nil, height = nil, antialias = nil, compression = nil)
end

#zoom(zoom_or_entities) ⇒ Object



129
130
# File 'lib/view.rb', line 129

def zoom(zoom_or_entities)
end

#zoom_extentsObject



131
132
# File 'lib/view.rb', line 131

def zoom_extents
end