~ubuntu-branches/ubuntu/intrepid/cairo/intrepid-updates

« back to all changes in this revision

Viewing changes to test/long-lines.c

  • Committer: Bazaar Package Importer
  • Author(s): Fabien Tassin
  • Date: 2008-09-25 16:22:33 UTC
  • mfrom: (1.1.9 upstream)
  • Revision ID: james.westby@ubuntu.com-20080925162233-btx61ymk181i7mcc
Tags: 1.7.6-0ubuntu1
* New upstream version. Most noticable changes are:
  - some API changes with especially the removal of
    cairo_font_options_set_lcd_filter and cairo_font_options_get_lcd_filter
  - xlib: Faster bookkeeping
  - PS: Fix gradients with non-constant alpha
  - Fix deadlock in user-font code
* debian/patches/00list: Remove 03_from_git_fix_lcd_filter_default.dpatch,
  add debian/patches/03_fix_ftbfs_withing_xcb.dpatch
* debian/libcairo2.symbols, debian/libcairo-directfb2.symbols: update
  list of symbols

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
 * IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
22
22
 *
23
23
 * Authors: Carl D. Worth <cworth@cworth.org>
24
 
 *          Emmanuel Pacaud <emmanuel.pacaud@lapp.in2p3.fr>
 
24
 *          Emmanuel Pacaud <emmanuel.pacaud@lapp.in2p3.fr>
25
25
 */
26
26
 
27
27
#include "cairo-test.h"
28
28
 
29
 
#define LINE_WIDTH      1.
30
 
#define SIZE            10
 
29
#define LINE_WIDTH      1.
 
30
#define SIZE            10
31
31
#define LINE_NBR        6
32
32
 
33
33
static cairo_test_draw_function_t draw;
34
34
 
35
 
cairo_test_t test = {
 
35
static const cairo_test_t test = {
36
36
    "long-lines",
37
37
    "Test long lines"
38
38
    "\nLong lines are not drawn due to the limitations of the internal 16.16 fixed-point coordinates",
45
45
    double length;
46
46
    double red, green, blue;
47
47
} lines[LINE_NBR] = {
48
 
    {      100.0, 1.0, 0.0, 0.0 },
49
 
    {    10000.0, 0.0, 1.0, 0.0 },
50
 
    {   100000.0, 0.0, 0.0, 1.0 },
51
 
    {  1000000.0, 1.0, 1.0, 0.0 },
52
 
    { 10000000.0, 0.0, 1.0, 1.0 },
53
 
    {100000000.0, 1.0, 0.0, 1.0 }
 
48
    {       100.0, 1.0, 0.0, 0.0 },
 
49
    {     10000.0, 0.0, 1.0, 0.0 },
 
50
    {    100000.0, 0.0, 0.0, 1.0 },
 
51
    {   1000000.0, 1.0, 1.0, 0.0 },
 
52
    {  10000000.0, 0.0, 1.0, 1.0 },
 
53
    { 100000000.0, 1.0, 0.0, 1.0 }
54
54
};
55
55
 
56
56
static cairo_test_status_t
65
65
    cairo_paint (cr);
66
66
    cairo_restore (cr);
67
67
 
68
 
 
69
68
    cairo_set_line_width (cr, LINE_WIDTH);
70
69
 
71
70
    pos = SIZE + .5;