Bug 3852

Summary: do cairo_image_surface_get_width/height() work on screen contexts?
Product: cairo Reporter: Pat Beirne <patbeirneottawa>
Component: generalAssignee: Carl Worth <cworth>
Status: RESOLVED DUPLICATE QA Contact: cairo-bugs mailing list <cairo-bugs>
Severity: normal    
Priority: high    
Version: 0.9.3   
Hardware: x86 (IA32)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:

Description Pat Beirne 2005-07-23 12:34:23 UTC
In a -gtk or -xlib environment, if I call cairo_get_target() and then use that surface to call
get_image_surface_width/height(), I get silly numbers. Is this the correct way to determine
the screen drawing size?

I have sample code to demo this, along the lines of:



  // find out our surface size
  cairo_surface_t *cs = cairo_get_target(cr);
  int width = cairo_image_surface_get_width(cs);
  int height = cairo_image_surface_get_height(cs);
#if DEBUG
  printf("surface area w: %d, h:%d\n",width,height);
#endif
Comment 1 Pat Beirne 2005-07-24 01:39:04 UTC

*** This bug has been marked as a duplicate of 3851 ***
Comment 2 Carl Worth 2005-08-22 17:15:05 UTC
Move bugs against "cvs" version to "0.9.3" so we can remove the "cvs" version.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.