Class: Daytona::ComputerUse::ScreenshotRegion

Inherits:
Object
  • Object
show all
Defined in:
lib/daytona/computer_use.rb

Overview

Region coordinates for screenshot operations.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(x:, y:, width:, height:) ⇒ ScreenshotRegion

Returns a new instance of ScreenshotRegion.

Parameters:

  • x (Integer)

    X coordinate of the region

  • y (Integer)

    Y coordinate of the region

  • width (Integer)

    Width of the region

  • height (Integer)

    Height of the region



427
428
429
430
431
432
# File 'lib/daytona/computer_use.rb', line 427

def initialize(x:, y:, width:, height:)
  @x = x
  @y = y
  @width = width
  @height = height
end

Instance Attribute Details

#heightInteger

Returns Height of the region.

Returns:

  • (Integer)

    Height of the region



421
422
423
# File 'lib/daytona/computer_use.rb', line 421

def height
  @height
end

#widthInteger

Returns Width of the region.

Returns:

  • (Integer)

    Width of the region



418
419
420
# File 'lib/daytona/computer_use.rb', line 418

def width
  @width
end

#xInteger

Returns X coordinate of the region.

Returns:

  • (Integer)

    X coordinate of the region



412
413
414
# File 'lib/daytona/computer_use.rb', line 412

def x
  @x
end

#yInteger

Returns Y coordinate of the region.

Returns:

  • (Integer)

    Y coordinate of the region



415
416
417
# File 'lib/daytona/computer_use.rb', line 415

def y
  @y
end