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



589
590
591
592
593
594
# File 'lib/daytona/computer_use.rb', line 589

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



577
578
579
# File 'lib/daytona/computer_use.rb', line 577

def fmt
  @fmt
end

#qualityInteger?

Returns Compression quality (0-100).

Returns:

  • (Integer, nil)

    Compression quality (0-100)



580
581
582
# File 'lib/daytona/computer_use.rb', line 580

def quality
  @quality
end

#scaleFloat?

Returns Scale factor for the screenshot.

Returns:

  • (Float, nil)

    Scale factor for the screenshot



583
584
585
# File 'lib/daytona/computer_use.rb', line 583

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



574
575
576
# File 'lib/daytona/computer_use.rb', line 574

def show_cursor
  @show_cursor
end