Changeset 697

Show
Ignore:
Timestamp:
04/20/08 07:30:10 (9 months ago)
Author:
tom
Message:

Don't clip coordinates to 16 bits if we're using cairo 1.6 as it is no
longer limited to 16 bit coordinates.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/cairo_renderer.cpp

    r696 r697  
    280280         void move_to(double x, double y) 
    281281         { 
     282#if CAIRO_VERSION < CAIRO_VERSION_ENCODE(1, 6, 0) 
    282283            if (x < -32767.0) x = -32767.0; 
    283284            else if (x > 32767.0) x = 32767.0; 
    284285            if (y < -32767.0) y = -32767.0; 
    285286            else if (y > 32767.0) y = 32767.0; 
     287#endif 
    286288 
    287289            context_->move_to(x, y); 
     
    291293         void line_to(double x, double y) 
    292294         { 
     295#if CAIRO_VERSION < CAIRO_VERSION_ENCODE(1, 6, 0) 
    293296            if (x < -32767.0) x = -32767.0; 
    294297            else if (x > 32767.0) x = 32767.0; 
    295298            if (y < -32767.0) y = -32767.0; 
    296299            else if (y > 32767.0) y = 32767.0; 
     300#endif 
    297301 
    298302            context_->line_to(x, y); 
     
    484488#endif 
    485489 
    486       if (cairo_version() >= CAIRO_VERSION_ENCODE(1, 6, 0)) 
    487       { 
    488          Envelope<double> bounds = t_.forward(t_.extent()); 
    489          context_->rectangle(bounds.minx(), bounds.miny(), bounds.maxx(), bounds.maxy()); 
    490          context_->clip(); 
    491       } 
     490#if CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 6, 0) 
     491      Envelope<double> bounds = t_.forward(t_.extent()); 
     492      context_->rectangle(bounds.minx(), bounds.miny(), bounds.maxx(), bounds.maxy()); 
     493      context_->clip(); 
     494#endif 
    492495 
    493496      boost::optional<Color> bg = m_.background();