3 Cache-image Snip
The library also defines a new type, argb, that represents a bitmap, but with alpha values. It has a maker, two selectors, and a predicate.
|
superclass: image-snip% |
method
(send a-cache-image-snip equal-to? snip equal?) → boolean? snip : (is-a?/c image-snip%) equal? : (any/c any/c . -> . boolean?) Calls the other-equal-to? method of snip if it is also a cache-image-snip% instance, otherwise calls the other-equal-to? of a-cache-image-snip.Returns a pixel array for this image, forcing it to be computed.
method
(send a-cache-image-snip get-argb-proc)
→ (argb? exact-integer? exact-integer? . -> . void?) Returns a procedure that fills in an argb with the contents of this image at the given offset
method
(send a-cache-image-snip get-argb/no-compute)
→ (or/c false/c argb?) Returns a pixel array for this image or #f if it has not been computed yet.Overrides get-bitmap in image-snip%.Builds (if not yet built) a bitmap corresponding to this snip and returns it.If the width or the height of the snip is 0, this method return #f.
Either returns false, or a procedure that draws the contents of this snip into a dc.
method
(send a-cache-image-snip get-pinhole) →
real? real? Returns the pinhole coordinates for this image, counting from the top-left of the image.Returns the width and height for the image.
method
(send a-cache-image-snip other-equal-to? snip equal?) → boolean? snip : (is-a?/c image-snip%) equal? : (any/c any/c . -> . boolean?) Overrides other-equal-to? in image-snip%.Refines the comparison of other-equal-to? in image-snip% to exactly match alpha channels.
value
procedure
vectorof : (integer-in 0 255) width : exact-nonnegative-integer? height : exact-nonnegative-integer?
procedure
(argb-vector argb) → (vectorof (integer-in 0 255))
argb : argb?
procedure
(argb-width argb) → exact-nonnegative-integer?
argb : argb?
procedure
(argb-height argb) → exact-nonnegative-integer?
argb : argb?
procedure
(overlay-bitmap dest dx dy img mask) → void?
dest : argb? dx : exact-integer? dy : exact-integer? img : (is-a?/c bitmap%) mask : (is-a?/c bitmap%)
procedure
(build-bitmap draw width height) → (is-a?/c bitmap%)
draw : ((is-a?/c dc<%>) . -> . any) width : (integer-in 1 10000) height : (integer-in 1 10000)
procedure
(flatten-bitmap bitmap) → (is-a?/c bitmap%)
bitmap : (is-a?/c bitmap%)
procedure
(argb->cache-image-snip argb dx dy) → (is-a?/c cache-image-snip%)
argb : argb? dx : real? dy : real?
If the width or height of argb is 0, this returns #f.