s-u / Cairo

R graphics device using cairo graphics library for creating high-quality output
12 stars 10 forks source link

xd->npages is set incorrect on cairotalk.c #6

Closed chinqw closed 10 years ago

chinqw commented 10 years ago

In function CairoGD_Close, xd->npages is increased by 1 on Line 412 xd->npages++; using xd->npages + 1 on Line 415 is incorrect.

R> img.png <- list() R> dev <- Cairo(800, 600, type='raster', bg="white") R> Cairo.onSave(dev, function(dev, page) { .GlobalEnv$img.png[[page]] <- writePNG(Cairo.capture(dev)) }) NULL

R> plot(1:10, col=2) R> plot(1:15) format = RGB (800 x 600) Error in .GlobalEnv$img.png[[page]] <- writePNG(Cairo.capture(dev)) : more elements supplied than there are to replace

chinqw commented 10 years ago

Thanks for addressing it quickly. looking forward to the publish of the next version.

s-u commented 10 years ago

Yes, please test it thoroughly - some people may get mad at for for releasing a version each day ;)