26 Drawing Functions
Returns a list of font face names available on the current system. If
kind is 'mono, then only faces that are known to
correspond to monospace fonts are included in the list.
If all-variants? is #f (the default), then the
result is in more standard terminology a list of font
family names, which are combined with style and weight options to
arrive at a face; if all-variants? is true, then the result
includes a string for each available face in the family.
Returns the built-in default face mapping for a particular font
family.
See font% for information about family.
Returns
(make-object bitmap% width height #f alpha?), but
this procedure is preferred because it defaults
alpha? in a
more useful way.
See also make-platform-bitmap and Portability and Bitmap Variants.
(make-brush | [ | #:color color | | | | | | | #:style style | | | | | | | #:stipple stipple | | | | | | | #:gradient gradient | | | | | | | #:transformation transformation | | | | | | | #:immutable? immutable?]) | | → | | (is-a?/c brush%) |
|
color : (or/c string? (is-a?/c color%)) = (make-color 0 0 0) |
| style | | : | | (or/c 'transparent 'solid 'opaque | 'xor 'hilite 'panel | 'bdiagonal-hatch 'crossdiag-hatch | 'fdiagonal-hatch 'cross-hatch | 'horizontal-hatch 'vertical-hatch) |
| | = | | 'solid |
|
stipple : (or/c #f (is-a?/c bitmap%)) = #f |
|
|
immutable? : any/c = #t |
Creates a
brush% instance. This procedure provides a
nearly equivalent interface compared to using
make-object with
brush%, but it also supports
the creation of immutable brushes (and creates immutable burshes by default).
When stipple is #f, gradient is
#f, transformation is #f,
immutable? is true, and color is either a
color% object or a string in the-color-database, the
result brush is created via find-or-create-brush of
the-brush-list.
Creates a
color% instance. This procedure provides a
nearly equivalent interface compared to using
make-object with
color%, but it creates
an immutable
color% object.
To create an immutable color based on a color string, use find-color
or the-color-database.
(make-font | [ | #:size size | | | | | | | #:face face | | | | | | | #:family family | | | | | | | #:style style | | | | | | | #:weight weight | | | | | | | #:underlined? underlined? | | | | | | | #:smoothing smoothing | | | | | | | #:size-in-pixels? size-in-pixels? | | | | | | | #:hinting hinting]) | | → | | (is-a?/c font%) |
|
size : (integer-in 1 1024) = 12 |
face : (or/c string? #f) = #f |
| family | | : | | (or/c 'default 'decorative 'roman 'script | 'swiss 'modern 'symbol 'system) |
| | = | | 'default |
|
style : (or/c 'normal 'italic 'slant) = 'normal |
weight : (or/c 'normal 'bold 'light) = 'normal |
underlined? : any/c = #f |
| smoothing | | : | | (or/c 'default 'partly-smoothed | 'smoothed 'unsmoothed) |
| | = | | 'default |
|
size-in-pixels? : any/c = #f |
hinting : (or/c 'aligned 'unaligned) = 'aligned |
Creates a
font% instance. This procedure provides an
equivalent but more convenient interface compared to using
make-object with
font%.
(make-pen | [ | #:color color | | | | | | | #:width width | | | | | | | #:style style | | | | | | | #:cap cap | | | | | | | #:join join | | | | | | | #:stipple stipple | | | | | | | #:immutable? immutable?]) | | → | | (is-a?/c pen%) |
|
color : (or/c string? (is-a?/c color%)) = (make-color 0 0 0) |
width : (real-in 0 255) = 0 |
| style | | : | | (or/c 'transparent 'solid 'xor 'hilite | 'dot 'long-dash 'short-dash 'dot-dash | 'xor-dot 'xor-long-dash 'xor-short-dash | 'xor-dot-dash) |
| | = | | 'solid |
|
cap : (or/c 'round 'projecting 'butt) = 'round |
join : (or/c 'round 'bevel 'miter) = 'round |
stipple : (or/c #f (is-a?/c bitmap%)) = #f |
immutable? : any/c = #t |
Creates a
pen% instance. This procedure provides a
nearly equivalent interface compared to using
make-object with
pen%, but it also supports
the creation of immutable pens (and creates immutable pens by default).
When stipple is #f, immutable? is true, and
color is either a color% object or a string in
the-color-database, the result pen is created via
find-or-create-pen of the-pen-list.
Creates a bitmap that uses platform-specific drawing operations
as much as possible, which is different than a
make-bitmap result
on Windows and Mac OS X. See
Portability and Bitmap Variants for more information.
|
in : (or path-string? input-port?) |
| kind | | : | | (or/c 'unknown 'unknown/mask 'unknown/alpha | 'gif 'gif/mask 'gif/alpha | 'jpeg 'jpeg/alpha | 'png 'png/mask 'png/alpha | 'xbm 'xbm/alpha 'xpm 'xpm/alpha | 'bmp 'bmp/alpha) |
| | | | = | | 'unknown/alpha |
|
bg-color : (or/c (is-a?/c color%) #f) = #f |
complain-on-failure? : any/c = #t |
Returns
(make-object bitmap% in kind bg-color complain-on-failure?), but this procedure is preferred because it
defaults
kind and
complain-on-failure? in a more
useful way.