MetaFun - Pragma ADE
MetaFun - Pragma ADE MetaFun - Pragma ADE
124 In this case the page=1 specification is not really needed. You can scale and manipulate the figure in any way supported by the macro package that you use. 3.9 Managing resources Figure 3.8 A silly figure, demonstrating that stand--alone--graphics can be made. A graphic consists of curves, either or not filled with a given color. A graphic can also include text, which means that fonts are used. Finally a graphic can have special effects, like a shaded fill. Colors, fonts and special effects go under the name resources, since they may demand special care or support from the viewing or printing device. Special effects, like shading, are supported by dedicated METAPOST modules. These are included in the CONTEXT distribution and will be discussed later in chapter 8. Since METAPOST supports color, an embedded graphic can be rather colorful. However, when color support is disabled or set up to convert colors to gray scales, CONTEXT will convert the colors in the graphics to gray scales. You may wonder what the advantage is of weighted gray conversion. Figure 3.9 shows the difference between natural colors, weighted gray scales and straightforward, non--weighted, gray scales. full color weighted gray linear gray Figure 3.9 The advantage of weighted gray over linear gray. Embedded graphics Managing resources
When we convert color to gray, we use the following formula. This kind of conversion also takes place in black and white televisions. G = .30r + .59g + .11b Section 8.5 introduces the grayed operation that you can use to convert a colored picture into a gray one. This macro uses the same conversion method as mentioned here. Managing resources Embedded graphics 125
- Page 77 and 78: 2.4 Scaling and shifting When we dr
- Page 79 and 80: Especially when a path results from
- Page 81 and 82: points first order curve second ord
- Page 83 and 84: first iteration second iteration th
- Page 85 and 86: and get: We don't even need that mu
- Page 87 and 88: Figure 2.3 Circles with minimized i
- Page 89 and 90: The tension specifier can be used t
- Page 91 and 92: The asymetrical tensions are less p
- Page 93 and 94: z0 .. z1 .. z2 z0 {curl 1} .. z1 ..
- Page 95 and 96: 7 In literature concerning POSTSCRI
- Page 97 and 98: currentpicture := currentpicture sl
- Page 99 and 100: We can achieve this by defining poi
- Page 101 and 102: We're still not there. Like in a pr
- Page 103 and 104: Due to the thicker line width used
- Page 105 and 106: left up down right The previous def
- Page 107 and 108: Here the & glues strings together,
- Page 109 and 110: picture p ; p := "MetaFun" normalin
- Page 111 and 112: pickup pencircle scaled 2pt ; draw
- Page 113 and 114: Because the z--variables are used f
- Page 115 and 116: 3 Embedded graphics In addition to
- Page 117 and 118: \startMPcode fill fullcircle scaled
- Page 119 and 120: \startuniqueMPgraphic{right or wron
- Page 121 and 122: {\externalfigure[mprun:extrafun::my
- Page 123 and 124: \startlinecorrection[blank] \proces
- Page 125 and 126: In order to prevent problems, we ad
- Page 127: There are a few more low level swit
- Page 131 and 132: 4 Enhancing the layout One of the m
- Page 133 and 134: 4.2 Overlay variables [offset=3pt,f
- Page 135 and 136: This background demonstrates that a
- Page 137 and 138: As you may know, TEX's ambassador i
- Page 139 and 140: This works as expected: \RotatedTex
- Page 141 and 142: We will now apply this knowledge of
- Page 143 and 144: p := p shifted (2o,OverlayHeight-yp
- Page 145 and 146: We demonstrated that when defining
- Page 147 and 148: 5 Positional graphics In this chapt
- Page 149 and 150: 5.2 Anchors and layers In a previou
- Page 151 and 152: pab := pab cutafter (pab intersecti
- Page 153 and 154: fill p withcolor \MPcolor{lightgray
- Page 155 and 156: The previous example also demonstra
- Page 157 and 158: \setMPlayer [test] [somepos-1] [loc
- Page 159 and 160: 6 Page backgrounds Especially in in
- Page 161 and 162: As soon as you want to make an elec
- Page 163 and 164: do_it (1,4,false) ; do_it (5,4,fals
- Page 165 and 166: gigigi Watch how the bounding boxes
- Page 167 and 168: You can test this concept yourself
- Page 169 and 170: StartPage ; fill Area[Text][Text] s
- Page 171 and 172: fi ; Main := Main enlarged 6pt ; pi
- Page 173 and 174: ulcorner Field[Text] [Text] -urcorn
- Page 175 and 176: The left picture demonstrates what
- Page 177 and 178: There are two more operators: inner
When we convert color to gray, we use the following formula. This kind of conversion also takes<br />
place in black and white televisions.<br />
G = .30r + .59g + .11b<br />
Section 8.5 introduces the grayed operation that you can use to convert a colored picture into a<br />
gray one. This macro uses the same conversion method as mentioned here.<br />
Managing resources Embedded graphics<br />
125