Method: Sketchup::InputPoint#pick

Defined in:
lib/sketchup-api-stubs/stubs/Sketchup/InputPoint.rb

#pick(view, x, y, inputpoint) ⇒ Object

The pick method is used to get the input point at a specific screen position.

The first form just uses the screen position to compute the InputPoint. It is used when you don’t want the InputPoint to be dependent on another InputPoint.

The second form uses the screen position and another InputPoint. It will find additional inferences such as along one of the axis directions from the first point.

Examples:

view = Sketchup.active_model.active_view
x = 100
y = 100
inputpoint = view.inputpoint x, y
inputpoint2 = Sketchup::InputPoint.new
inputpoint.pick view, x, y
inputpoint.pick view, x, y, inputpoint2

Parameters:

  • view

    The current view.

  • x

    A x value.

  • y

    A y value.

  • inputpoint (optional)

    A second input point used as a reference for the pick.

Returns:

  • status - true if a valid InputPoint was picked and it is different than it was before.

Version:

  • SketchUp 6.0



304
305
# File 'lib/sketchup-api-stubs/stubs/Sketchup/InputPoint.rb', line 304

def pick(view, x, y, inputpoint)
end