From 64fb291b0f0ea648fbc629be28456fb3fbdee358 Mon Sep 17 00:00:00 2001 From: "Artyom V. Poptsov" Date: Sat, 19 Aug 2023 19:22:21 +0300 Subject: [PATCH] doc/guile-png.texi (Selection): New section --- doc/guile-png.texi | 53 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) diff --git a/doc/guile-png.texi b/doc/guile-png.texi index 41da20b..9bc4c8d 100644 --- a/doc/guile-png.texi +++ b/doc/guile-png.texi @@ -644,6 +644,59 @@ Height of the dimension. Check if @var{object} is a @code{} instance. @end deffn +@subsection Selection + +@code{(png graphics selection)} contains a @code{} class. + +@deftp {Class} @ + [#:image=#f] @ + [#:position=(make )] @ + [#:dimension=(make )] + +This class describes a selected are for the specified @var{image}. + +Constructor parameters: +@table @asis +@item #:image (img ) +A PNG image. +@item #:position (pos ) +Position of the top left corner of the selection. +@item #:dimension (dim ) +The size of the selection. +@end table + +@end deftp + +@deffn {Method} selection? object +Check if @var{object} is a @code{} instance. +@end deffn + +@deffn {Method} selection-image (selection ) +The base image of a @var{selection}. +@end deffn + +@deffn {Method} selection-position (selection ) +The position of the selected area. +@end deffn + +@deffn {Method} selection-dimension (selection ) +The size of the selected area. +@end deffn + +@deffn {Method} png-image-select (image ) @ + (position ) @ + (dimension ) + +Create a new selection out of the specified @var{image}. + +@end deffn + +@deffn {Method} selection-crop (selection ) + +Crop a part of the base image using a @var{selection}. + +@end deffn + @section PNG Image Processing @code{(png image-processing)} provides high-level API for processing PNG