Skip to content

Commit

Permalink
doc/guile-png.texi (Selection): New section
Browse files Browse the repository at this point in the history
  • Loading branch information
artyom-poptsov committed Aug 19, 2023
1 parent 023687f commit 64fb291
Showing 1 changed file with 53 additions and 0 deletions.
53 changes: 53 additions & 0 deletions doc/guile-png.texi
Original file line number Diff line number Diff line change
Expand Up @@ -644,6 +644,59 @@ Height of the dimension.
Check if @var{object} is a @code{<dimension>} instance.
@end deffn

@subsection Selection

@code{(png graphics selection)} contains a @code{<selection>} class.

@deftp {Class} <selection> @
[#:image=#f] @
[#:position=(make <point>)] @
[#:dimension=(make <dimension>)]

This class describes a selected are for the specified @var{image}.

Constructor parameters:
@table @asis
@item #:image (img <png-image>)
A PNG image.
@item #:position (pos <point>)
Position of the top left corner of the selection.
@item #:dimension (dim <dimension>)
The size of the selection.
@end table

@end deftp

@deffn {Method} selection? object
Check if @var{object} is a @code{<selection>} instance.
@end deffn

@deffn {Method} selection-image (selection <selection>)
The base image of a @var{selection}.
@end deffn

@deffn {Method} selection-position (selection <selection>)
The position of the selected area.
@end deffn

@deffn {Method} selection-dimension (selection <selection>)
The size of the selected area.
@end deffn

@deffn {Method} png-image-select (image <png-image>) @
(position <point>) @
(dimension <dimension>)

Create a new selection out of the specified @var{image}.

@end deffn

@deffn {Method} selection-crop (selection <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
Expand Down

0 comments on commit 64fb291

Please sign in to comment.