10 Include Bitmap

▼ |  | Mr Lib: Extra GUI Libraries

1 | Aligned Pasteboard
2 | Arrow Toggle Snip
3 | Bitmap Label
4 | Cache-image Snip
5 | Close Icon
6 | Expandable Snip
7 | GIF and Animated GIF Writing
8 | Graphs
9 | Hierarchical List Control
10 | Include Bitmap
11 | Interactive Value Port
12 | Name Message
13 | Path Dialog
14 | Plot
15 | Switchable Button
16 | Image Core
17 | Matrix Snip
18 | Snip Canvases
19 | Syntax Browser
20 | Te X Table
21 | Terminal Window
22 | White on Black Panel Predicate
23 | Acknowledgments
| Index

On this page:

include-bitmap
include-bitmap/ relative-to

Racket
top contents ← prev up next →

## 10 Include Bitmap🔗ℹ

(require mrlib/include-bitmap) | package: gui-lib

The include-bitmap form takes a filename containing a bitmap and “inlines” the bitmap into the program.

Historically, the advantage of inlining the bitmap is that a stand-alone executable can be created that contains the bitmap and does not refer to the original image file. The define-runtime-path form, however, now provides a better alternative.

> syntax (include-bitmap path-spec)
> (include-bitmap path-spec type-expr)

The path-spec is the same as for include form. The type-expr should produce 'unknown, 'unknown/mask, etc., as for bitmap%, and the default is 'unknown/mask.

> syntax (include-bitmap/relative-to source path-spec)
> (include-bitmap/relative-to source path-spec [type-expr])

Analogous to include-at/relative-to, though only a source is needed (no context).
top contents ← prev up next →