diff options
author | mh0310.choi <mh0310.choi@samsung.com> | 2015-07-28 10:46:57 +0900 |
---|---|---|
committer | mh0310.choi <mh0310.choi@samsung.com> | 2015-07-28 13:08:12 +0900 |
commit | 5e67a6f721eaedda61300baf0799199c7771ebd0 (patch) | |
tree | 6cd50b52498aab50e79b966cdccc2a137db316d9 /doc/tutorial/src/README | |
parent | d3aeffba37161d2b76b29c4ea13369bd67a47a8e (diff) | |
download | cairo-5e67a6f721eaedda61300baf0799199c7771ebd0.tar.gz cairo-5e67a6f721eaedda61300baf0799199c7771ebd0.tar.bz2 cairo-5e67a6f721eaedda61300baf0799199c7771ebd0.zip |
Cairo version Upgrade for Tizen3.0submit/tizen_tv/20150728.091927submit/tizen_mobile/20150728.091912submit/tizen_common/20150728.091859accepted/tizen/tv/20150729.011254accepted/tizen/mobile/20150729.011230
- from 1.12.14 to 1.14.2
Change-Id: I3b62d212041b337bbb926d579f9ce74f42a45c3b
Diffstat (limited to 'doc/tutorial/src/README')
-rw-r--r-- | doc/tutorial/src/README | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/doc/tutorial/src/README b/doc/tutorial/src/README new file mode 100644 index 000000000..a2738da4e --- /dev/null +++ b/doc/tutorial/src/README @@ -0,0 +1,66 @@ +Welcome to the cairo tutorial: + ++--------------------------------+ +| How to Recognize Ugly Graphics | +|(and what you can do about them)| ++--------------------------------+ + +This directory is your personal playground for following along with +the examples. In order for you to make use of these files you will +need to have cairo and its header files installed. You can find +instructions for doing this at: + + http://cairographics.org/tutorial + +Notice that there are a few .c files in this directory. + +You should start out by just typing "make" which will turn each .c +file into several different programs. Go ahead and run each of the +programs and see what they do. Some of them will open up new X windows +while others will simply write their output to files (such .png or +.pdf). + +After you play with those a bit, go ahead and take a look at the +contents of the .c files. You'll see that each file contains a draw() +function that does all of the drawing. + +You might be surprised to notice that there is no main() function in +any of the files. Instead, main is hidden away by means of +cairo-tutorial.h. This rather non-conventional style is used to allow +you to focus on the actual drawing code involved in using cairo, while +not having to worry about the setup semantics. We don't recommend that +you follow this style for real projects. + +As you follow along during the tutorial and get some ideas for things +to draw, you'll want to start making your own .c files. You can copy +an existing file or make your own by following this simple minimal +template: + + #include "cairo-tutorial.h" + + static void + draw (cairo_t *cr, int width, int height) + { + /* Put your drawing code here. */ + } + +Any new file you create will automatically get picked up by the +Makefile so that "make" will compile your file into several different +programs, just like the existing examples. + +If you'd like to control the initial size of the output, you may +define WIDTH and HEIGHT before including cairo-tutorial.h like so: + + #define WIDTH 100 + #define HEIGHT 100 + + #include "cairo-tutorial.h" + +If you would like to change the set of cairo-backend target programs +that are compiled, you may edit the "all" target in the Makefile. + +Have fun! + +-Carl Worth + +cworth@redhat.com |