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



453
454
455
456
457
458
# File 'lib/daytona/computer_use.rb', line 453

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’)



441
442
443
# File 'lib/daytona/computer_use.rb', line 441

def fmt
  @fmt
end

#qualityInteger?

Returns Compression quality (0-100).

Returns:

  • (Integer, nil)

    Compression quality (0-100)



444
445
446
# File 'lib/daytona/computer_use.rb', line 444

def quality
  @quality
end

#scaleFloat?

Returns Scale factor for the screenshot.

Returns:

  • (Float, nil)

    Scale factor for the screenshot



447
448
449
# File 'lib/daytona/computer_use.rb', line 447

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



438
439
440
# File 'lib/daytona/computer_use.rb', line 438

def show_cursor
  @show_cursor
end