5 Images
(require (planet dyoo/js-vm:1:11/image/image)) |
This module provides functions for creating images. The design of the library is meant to follow 2htdp/image.
(image? x) → boolean? |
x : any/c |
(image=? x y) → boolean? |
x : any/c |
y : any/c |
(circle radius style color) → image? |
radius : nonnegative-real? |
style : (one-of/c 'solid 'outline) |
color : color? |
(nw:rectangle width height style color) → image? |
width : number? |
height : number? |
style : (one-of/c 'solid 'outline) |
color : color? |
(rectangle width height style color) → image? |
width : number? |
height : number? |
style : (one-of/c 'solid 'outline) |
color : color? |
(ellipse) → image? |
(empty-scene width height) → image? |
width : number? |
height : number? |
(place-image x y an-image background) → image? |
x : number? |
y : number? |
an-image : image? |
background : image? |
(overlay/xy img1 x y img2) → image? |
img1 : image? |
x : real? |
y : real? |
img2 : image? |
(underlay/xy img1 x y img2) → image? |
img1 : image? |
x : real? |
y : real? |
img2 : image? |
(put-pinhole img x y) → image? |
img : image? |
x : real? |
y : real? |
(image-width an-image) → number? |
an-image : image? |
(image-height an-image) → number? |
an-image : image? |
Colors can be specified either by an RGB color structure, or by string name. Both are described now.
(make-color red green blue) → color |
red : number? |
green : number? |
blue : number? |
(color-red c) → number |
c : color? |
(color-green c) → number |
c : color? |
(color-blue c) → number |
c : color? |
5.1 Available colors
"orange"
"red"
"orangered"
"tomato"
"darkred"
"red"
"firebrick"
"crimson"
"deeppink"
"maroon"
"indian red"
"indianred"
"medium violet red"
"mediumvioletred"
"violet red"
"violetred"
"lightcoral"
"hotpink"
"palevioletred"
"lightpink"
"rosybrown"
"pink"
"orchid"
"lavenderblush"
"snow"
"chocolate"
"saddlebrown"
"brown"
"darkorange"
"coral"
"sienna"
"orange"
"salmon"
"peru"
"darkgoldenrod"
"goldenrod"
"sandybrown"
"lightsalmon"
"darksalmon"
"gold"
"yellow"
"olive"
"burlywood"
"tan"
"navajowhite"
"peachpuff"
"khaki"
"darkkhaki"
"moccasin"
"wheat"
"bisque"
"palegoldenrod"
"blanchedalmond"
"medium goldenrod"
"mediumgoldenrod"
"papayawhip"
"mistyrose"
"lemonchiffon"
"antiquewhite"
"cornsilk"
"lightgoldenrodyellow"
"oldlace"
"linen"
"lightyellow"
"seashell"
"beige"
"floralwhite"
"ivory"
"green"
"lawngreen"
"chartreuse"
"green yellow"
"greenyellow"
"yellow green"
"yellowgreen"
"medium forest green"
"olivedrab"
"mediumforestgreen"
"dark olive green"
"darkolivegreen"
"darkseagreen"
"lime"
"dark green"
"darkgreen"
"lime green"
"limegreen"
"forest green"
"forestgreen"
"spring green"
"springgreen"
"medium spring green"
"mediumspringgreen"
"sea green"
"seagreen"
"medium sea green"
"mediumseagreen"
"aquamarine"
"lightgreen"
"pale green"
"palegreen"
"medium aquamarine"
"mediumaquamarine"
"turquoise"
"lightseagreen"
"medium turquoise"
"mediumturquoise"
"honeydew"
"mintcream"
"royalblue"
"dodgerblue"
"deepskyblue"
"cornflowerblue"
"steel blue"
"steelblue"
"lightskyblue"
"dark turquoise"
"darkturquoise"
"cyan"
"aqua"
"darkcyan"
"teal"
"sky blue"
"skyblue"
"cadet blue"
"cadetblue"
"dark slate gray"
"darkslategray"
"lightslategray"
"slategray"
"light steel blue"
"lightsteelblue"
"light blue"
"lightblue"
"powderblue"
"paleturquoise"
"lightcyan"
"aliceblue"
"azure"
"medium blue"
"mediumblue"
"darkblue"
"midnight blue"
"midnightblue"
"navy"
"blue"
"indigo"
"blue violet"
"blueviolet"
"medium slate blue"
"mediumslateblue"
"slate blue"
"slateblue"
"purple"
"dark slate blue"
"darkslateblue"
"darkviolet"
"dark orchid"
"darkorchid"
"mediumpurple"
"cornflower blue"
"medium orchid"
"mediumorchid"
"magenta"
"fuchsia"
"darkmagenta"
"violet"
"plum"
"lavender"
"thistle"
"ghostwhite"
"white"
"whitesmoke"
"gainsboro"
"light gray"
"lightgray"
"silver"
"gray"
"dark gray"
"darkgray"
"dim gray"
"dimgray"
"black"