| Did you know ... | Search Documentation: |
| Get methods |
<-bitmap
when that is non-@nil.|colour(x, y). Returns a colour for pixmap
images and a boolean for bitmap images.
magnify(Im, Factor, Magnified) :-
get(Im, size, size(W, H)),
NW is round(W * Factor),
NH is round(H * Factor),
get(Im, scale, size(NW, NH), Magnified).
See also image->resize
and image<-rotate.
pixmap) or to white (for bitmap). The image<-hot_spot
is updated automatically.
For rotated text and other rotated graphicals, prefer a
figure with a transform instead of
pre-rendering into an image: the figure rotates its children on the fly
via cairo, so the text stays glyph-accurate at every angle and the
receiver remains interactive (hit-tested, repainted on demand, ...).
Example:
draw_vertical(Dev, X, Y, String, Font) :-
new(F, figure),
send(F, display, text(String, left, Font)),
send(F, rotate, 90),
send(Dev, display, F, point(X, Y)).
|resource -> image->initialise.|name|resource|graphical -> image
bitmap object — yields its image<-image;.path
— loads and pools the image;rc resource term — yields the resource's image;graphical — produces a fresh image by rendering the
graphical into it via image->draw_in.