openAVproductions / openAV-Ctlra

A plain C library to program with hardware controllers.
BSD 3-Clause "New" or "Revised" License
78 stars 16 forks source link

assuming image dimensions in ctlra_cairo.c #104

Open Be-ing opened 3 years ago

Be-ing commented 3 years ago

https://github.com/openAVproductions/openAV-Ctlra/blob/881798bbadd04890c378f6e6079a8710d1fa3566/ctlra/ctlra_cairo.c#L61

Shouldn't this be using the width and height parameters of the function?

harryhaaren commented 3 years ago

Yes. Screen support is WIP, and there are lots of assumptions in the code for NI hardware with specific pixel dimensions right now.

[Edit] To be clearer - each device will require its own "to device format" pixel conversion function. Here there are a few options to play with Cairo contexts at various different RGB888, or RGBA8888 formats, and convert the results into the device-speicfic formats. This needs to be abstracted via a function-pointer to enable all devices. At that point it must also scale to other pixel resolutions etc.