sammycage / lunasvg

lunasvg is a standalone SVG rendering library in C++
MIT License
818 stars 115 forks source link

Is there chance that c6cad06 checking is braking the library #156

Closed gabrielaexile closed 5 months ago

gabrielaexile commented 5 months ago

Is there chance that c6cad06 checking is braking the library ?

I basically feed matrix to it like this:

lunasvg::Matrix matrix(width / me->Document->width(), 0, 0, height / me->Document->height(), 0, 0)

And render with this:

me->Document->render(bitmap, matrix);

But as of c6cad06 then nothing gets drawn.

sammycage commented 5 months ago

Thanks for your feedback. I am currently investigating the issue and will keep you updated on any progress.

sammycage commented 5 months ago

@gabrielaexile To help us investigate and address the problem more effectively, could you please provide a test file or sample data that reproduces the issue?

gabrielaexile commented 5 months ago

I was basically just using the tiger.svg. Am guessing you did not manage to reproduce the problem ?

And setting matrix before calling render so something like:

int height = 500; int width = 500;

// Buffer for the image is created before this.

auto document = Document::loadFromFile("tiger.svg");

auto bitmap = lunasvg::Bitmap(buffer, width, height, width * 4);

if (!bitmap.valid()) { return NULL; }

bitmap.clear(bgColor);

lunasvg::Matrix matrix(width / document ->width(), 0, 0, height / document ->height(), 0, 0); document ->render(bitmap, matrix);

sammycage commented 5 months ago

@gabrielaexile Could you please also share the "tiger.svg" file that you mentioned?

gabrielaexile commented 5 months ago

Tiger

gabrielaexile commented 5 months ago

I started again with clean repo and got it to work finally. So closing this (sorry about the false alarm) !!

gabrielaexile commented 5 months ago

got it to work