Class: Daytona::ComputerUse::ScreenshotOptions

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

Overview

Options for screenshot compression and display.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(show_cursor: nil, format: nil, quality: nil, scale: nil) ⇒ ScreenshotOptions

Returns a new instance of ScreenshotOptions.

Parameters:

  • show_cursor (Boolean, nil) (defaults to: nil)

    Whether to show the cursor in the screenshot

  • format (String, nil) (defaults to: nil)

    Image format (e.g., ‘png’, ‘jpeg’, ‘webp’)

  • quality (Integer, nil) (defaults to: nil)

    Compression quality (0-100)

  • scale (Float, nil) (defaults to: nil)

    Scale factor for the screenshot



408
409
410
411
412
413
# File 'lib/daytona/computer_use.rb', line 408

def initialize(show_cursor: nil, format: nil, quality: nil, scale: nil)
  @show_cursor = show_cursor
  @fmt = format
  @quality = quality
  @scale = scale
end

Instance Attribute Details

#fmtString?

Returns Image format (e.g., ‘png’, ‘jpeg’, ‘webp’).

Returns:

  • (String, nil)

    Image format (e.g., ‘png’, ‘jpeg’, ‘webp’)



396
397
398
# File 'lib/daytona/computer_use.rb', line 396

def fmt
  @fmt
end

#qualityInteger?

Returns Compression quality (0-100).

Returns:

  • (Integer, nil)

    Compression quality (0-100)



399
400
401
# File 'lib/daytona/computer_use.rb', line 399

def quality
  @quality
end

#scaleFloat?

Returns Scale factor for the screenshot.

Returns:

  • (Float, nil)

    Scale factor for the screenshot



402
403
404
# File 'lib/daytona/computer_use.rb', line 402

def scale
  @scale
end

#show_cursorBoolean?

Returns Whether to show the cursor in the screenshot.

Returns:

  • (Boolean, nil)

    Whether to show the cursor in the screenshot



393
394
395
# File 'lib/daytona/computer_use.rb', line 393

def show_cursor
  @show_cursor
end