diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/LibreOfficeKit/LibreOfficeKit.h | 9 | ||||
-rw-r--r-- | include/LibreOfficeKit/LibreOfficeKit.hxx | 13 |
2 files changed, 19 insertions, 3 deletions
diff --git a/include/LibreOfficeKit/LibreOfficeKit.h b/include/LibreOfficeKit/LibreOfficeKit.h index 0799584d3097..f8021065af1e 100644 --- a/include/LibreOfficeKit/LibreOfficeKit.h +++ b/include/LibreOfficeKit/LibreOfficeKit.h @@ -309,6 +309,15 @@ struct _LibreOfficeKitDocumentClass /// @see lok::Document::getPartInfo(). char* (*getPartInfo) (LibreOfficeKitDocument* pThis, int nPart); + /// Paints window with given id to the buffer with the give DPI scale + /// (every pixel is dpiscale-times larger). + /// @see lok::Document::paintWindow(). + void (*paintWindowDPI) (LibreOfficeKitDocument* pThis, unsigned nWindowId, + unsigned char* pBuffer, + const int x, const int y, + const int width, const int height, + const double dpiscale); + #endif // defined LOK_USE_UNSTABLE_API || defined LIBO_INTERNAL_ONLY }; diff --git a/include/LibreOfficeKit/LibreOfficeKit.hxx b/include/LibreOfficeKit/LibreOfficeKit.hxx index 232eada69821..51d072331762 100644 --- a/include/LibreOfficeKit/LibreOfficeKit.hxx +++ b/include/LibreOfficeKit/LibreOfficeKit.hxx @@ -164,16 +164,23 @@ public: * @param y y-coordinate from where the dialog should start painting * @param width The width of the dialog image to be painted * @param height The height of the dialog image to be painted + * @param dpiscale The dpi scale value used by the client. Please note + * that the x, y, width, height are supposed to be the + * values with dpiscale applied (ie. dialog covering + * 100x100 "normal" pixels with dpiscale '2' will have + * 200x200 width x height), so that it is easy to compute + * the buffer sizes etc. */ void paintWindow(unsigned nWindowId, unsigned char* pBuffer, const int x, const int y, const int width, - const int height) + const int height, + const double dpiscale = 1.0) { - return mpDoc->pClass->paintWindow(mpDoc, nWindowId, pBuffer, - x, y, width, height); + return mpDoc->pClass->paintWindowDPI(mpDoc, nWindowId, pBuffer, + x, y, width, height, dpiscale); } /** |