mirror of
https://gitlab.freedesktop.org/wayland/wayland-protocols.git
synced 2025-12-20 05:50:09 +01:00
Merge branch 'cropping' into 'main'
Add cropping functionality to allow clients to capture specific regions of image sources instead of the entire source See merge request wayland/wayland-protocols!440
This commit is contained in:
commit
ae5b513d17
1 changed files with 32 additions and 1 deletions
|
|
@ -199,7 +199,7 @@
|
|||
</request>
|
||||
</interface>
|
||||
|
||||
<interface name="ext_image_copy_capture_frame_v1" version="1">
|
||||
<interface name="ext_image_copy_capture_frame_v1" version="2">
|
||||
<description summary="image capture frame">
|
||||
This object represents an image capture frame.
|
||||
|
||||
|
|
@ -217,6 +217,7 @@
|
|||
<entry name="no_buffer" value="1" summary="capture sent without attach_buffer"/>
|
||||
<entry name="invalid_buffer_damage" value="2" summary="invalid buffer damage"/>
|
||||
<entry name="already_captured" value="3" summary="capture request has been sent"/>
|
||||
<entry name="invalid_viewport" value="4" summary="invalid viewport region" since="2"/>
|
||||
</enum>
|
||||
|
||||
<request name="destroy" type="destructor">
|
||||
|
|
@ -284,6 +285,36 @@
|
|||
</description>
|
||||
</request>
|
||||
|
||||
<request name="set_viewport" since="2">
|
||||
<description summary="set the viewport for cropping">
|
||||
Set a viewport for the capture, cropping the source to a specific
|
||||
region. The viewport is defined in the source's coordinate system.
|
||||
|
||||
The coordinates (x, y) specify the top-left corner of the viewport
|
||||
relative to the source's top-left corner. The width and height
|
||||
specify the dimensions of the region to capture.
|
||||
|
||||
If this request is not called, the whole source is captured.
|
||||
|
||||
If width or height are zero or negative, the invalid_viewport protocol
|
||||
error is raised.
|
||||
|
||||
The viewport must be fully contained within the source boundaries at
|
||||
the time of capture.
|
||||
|
||||
When the viewport is set or changed, the client should damage the
|
||||
entire buffer for the next capture, as the relationship between
|
||||
source content and buffer content may have changed.
|
||||
|
||||
This request must not be sent after capture, or else the
|
||||
already_captured protocol error is raised.
|
||||
</description>
|
||||
<arg name="x" type="int" summary="viewport x coordinate"/>
|
||||
<arg name="y" type="int" summary="viewport y coordinate"/>
|
||||
<arg name="width" type="int" summary="viewport width"/>
|
||||
<arg name="height" type="int" summary="viewport height"/>
|
||||
</request>
|
||||
|
||||
<event name="transform">
|
||||
<description summary="buffer transform">
|
||||
This event is sent before the ready event and holds the transform that
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue