File:Cairo example.svg
From Wikimedia Commons, the free media repository
Jump to navigation
Jump to search
Size of this PNG preview of this SVG file: 125 × 125 pixels. Other resolutions: 240 × 240 pixels | 480 × 480 pixels | 768 × 768 pixels | 1,024 × 1,024 pixels | 2,048 × 2,048 pixels.
Original file (SVG file, nominally 125 × 125 pixels, file size: 25 KB)
File information
Structured data
Captions
Summary
[edit]DescriptionCairo example.svg | This is an example with a german label "Hallo Wikipedia!" | ||||||
Date | |||||||
Source |
own sourcecode, compile with gcc cairo.c `pkg-config --cflags --libs cairo` and execute it. |
||||||
Author |
|
||||||
Permission (Reusing this file) |
it's quite stupid, so see it as public domain:
|
||||||
SVG development InfoField | This vector image was created with gcc cairo.c. | ||||||
Source code InfoField | SVG code#include <cairo-svg.h>
#include <stdio.h>
int main(int argc, char **argv) {
cairo_t *cr;
cairo_surface_t *surface;
cairo_pattern_t *pattern;
int x,y;
surface = (cairo_surface_t *)cairo_svg_surface_create("beispiel.svg", 100.0, 100.0);
cr = cairo_create(surface);
/* Quadrate im Hintergrund zeichnen */
for (x=0; x<10; x++)
for (y=0; y<10; y++)
cairo_rectangle(cr, x*10.0, y*10.0, 5, 5);
pattern = cairo_pattern_create_radial(50, 50, 5, 50, 50, 50);
cairo_pattern_add_color_stop_rgb(pattern, 0, 0.75, 0.15, 0.99);
cairo_pattern_add_color_stop_rgb(pattern, 0.9, 1, 1, 1);
cairo_set_source(cr, pattern);
cairo_fill(cr);
/* Schrift im Vordergrund */
cairo_set_font_size (cr, 15);
cairo_select_font_face (cr, "Georgia",
CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_BOLD);
cairo_set_source_rgb (cr, 0, 0, 0);
cairo_move_to(cr, 10, 25);
cairo_show_text(cr, "Hallo");
cairo_move_to(cr, 10, 75);
cairo_show_text(cr, "Wikipedia!");
cairo_destroy (cr);
cairo_surface_destroy (surface);
return 0;
}
|
File history
Click on a date/time to view the file as it appeared at that time.
Date/Time | Thumbnail | Dimensions | User | Comment | |
---|---|---|---|---|---|
current | 01:56, 15 May 2008 | 125 × 125 (25 KB) | Sven (talk | contribs) | {{Information |Description=This is a stupid example with a german label "Hallo Wikipedia!" |Source=own sourcecode, compile with <code>gcc cairo.c `pkg-config --cflags --libs cairo`</code> and execute it. <source lang="c"> #include <string.h> #include <ca |
You cannot overwrite this file.
File usage on Commons
The following 2 pages use this file:
File usage on other wikis
The following other wikis use this file:
- Usage on de.wikipedia.org
- Cairo (Grafikbibliothek)
- Benutzer Diskussion:Zollernalb/Archiv/2010
- Benutzer:Der Buckesfelder/Vorlage:Hallo
- Benutzer Diskussion:Cartrodus
- Benutzer Diskussion:Dshavit
- Benutzer Diskussion:TimHarder
- Benutzer Diskussion:DavidSchindler
- Benutzer Diskussion:Philipp47
- Benutzer Diskussion:LapplandTimes
- Benutzer Diskussion:Bergelmir231158
- Benutzer Diskussion:Xbel
- Benutzer Diskussion:Jaapkievit
- Benutzer Diskussion:Erich Sommerer GmbH
- Benutzer Diskussion:Gomminginger
- Benutzer Diskussion:Just Woodstock
- Benutzer Diskussion:B.Giertz
- Benutzer Diskussion:Juuso
- Benutzer Diskussion:Lolammed
- Benutzer Diskussion:XXMusicJunkeyXx
- Benutzer Diskussion:Kingcase
- Benutzer Diskussion:Bhennings
- Benutzer Diskussion:Schnapsfritze
- Benutzer Diskussion:Macros55
- Benutzer Diskussion:ThisisMe
- Benutzer Diskussion:Mikulas
- Benutzer Diskussion:Salara
- Benutzer Diskussion:Auguste Bolte
- Benutzer Diskussion:Josf~dewiki
- Benutzer Diskussion:Ingo Kuebler
- Benutzer Diskussion:Jüttner
- Benutzer Diskussion:Cyberdine
- Benutzer Diskussion:Holzrohr
- Benutzer Diskussion:Gofreaky
- Benutzer Diskussion:Schliekieker
- Benutzer Diskussion:Salzigerhund
- Benutzer Diskussion:Creatix
- Benutzer Diskussion:Bock.stuttgart
- Benutzer Diskussion:Valmar~dewiki
- Benutzer Diskussion:Wiesebohm
- Benutzer Diskussion:Newyorkberlin
- Benutzer Diskussion:Bhwiki
- Benutzer Diskussion:Gerrhonotus
- Benutzer Diskussion:Da.humm
- Benutzer Diskussion:Alfgaile
- Benutzer Diskussion:Zeitgeschichte2010
- Benutzer Diskussion:Verenita
- Benutzer Diskussion:Timacoustic
- Benutzer Diskussion:Sfgravensburg
- Benutzer Diskussion:HH1234
- Benutzer Diskussion:Bjhennings
View more global usage of this file.