bug-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #19352] Cairo: bad EPS from NSView_dataWithEPSInsideRect:


From: Fred Kiefer
Subject: [bug #19352] Cairo: bad EPS from NSView_dataWithEPSInsideRect:
Date: Tue, 16 Oct 2007 16:44:03 +0000
User-agent: Mozilla/5.0 (compatible; Konqueror/3.5; Linux) KHTML/3.5.5 (like Gecko)

Follow-up Comment #10, bug #19352 (project gnustep):

I wrote a small test program and this shows that the problem with the clip
copying is completely within cairo. Here is the code:

#include <stddef.h>
#include <cairo.h>
#include <cairo-ps.h>

int 
main (int argc, const char *argv[])
{
  cairo_status_t status;
  cairo_t *ct;
  cairo_surface_t *surface;
  cairo_rectangle_list_t *clip_rects;
 
  surface = cairo_ps_surface_create("test.ps", 100, 100);
  status = cairo_surface_status(surface);
  if (status != CAIRO_STATUS_SUCCESS)
    {
      printf("Cairo status '%s' for surfacen",
cairo_status_to_string(status));
      return 0;
    }

  ct = cairo_create(surface);
  status = cairo_status(ct);
  if (status != CAIRO_STATUS_SUCCESS)
    {
      printf("Cairo status '%s' for contextn",
cairo_status_to_string(status));
      return 0;
    }

  cairo_reset_clip(ct);
  cairo_rectangle(ct, 10, 10, 80, 80);
  cairo_clip(ct);
  clip_rects = cairo_copy_clip_rectangle_list(ct);
  status = clip_rects->status;
  if (status != CAIRO_STATUS_SUCCESS)
    {
      printf("Cairo status '%s' in copy clipn",
cairo_status_to_string(status));
    }

  cairo_destroy(ct);
  cairo_surface_destroy(surface);
}


Compile with the usual command (eg. gcc -I/usr/local/include/cairo cairo.c
-L/usr/local/lib -L/usr/X11R6/lib -lcairo -lm -lfreetype -lz -lfontconfig
-lexpat -lpng12 -lXrender -lX11 -lpthread -o cairo_test)

THis leaves only the positioning of the draw area to be resolved in GNUstep.


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?19352>

_______________________________________________
  Nachricht geschickt von/durch Savannah
  http://savannah.gnu.org/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]