bundled/include/LibreOfficeKit/LibreOfficeKit.h | 8 ++++++++ kit/DummyLibreOfficeKit.cpp | 23 +++++++++++++++++++++++ kit/Watermark.hpp | 2 +- 3 files changed, 32 insertions(+), 1 deletion(-)
New commits: commit 2c598ba4ef8015e9fd2a5a6ffe9fa064dbbead4e Author: mert <mert.tu...@collabora.com> AuthorDate: Thu Oct 24 12:13:46 2019 +0300 Commit: Ashod Nakashian <ashnak...@gmail.com> CommitDate: Sun Nov 10 23:42:03 2019 +0100 Rotate Watermarks with 45 degree angle Change-Id: I9b399a4e1daf52f536d4becae2cc6dc692e16f7a Reviewed-on: https://gerrit.libreoffice.org/81436 Reviewed-by: Ashod Nakashian <ashnak...@gmail.com> Tested-by: Ashod Nakashian <ashnak...@gmail.com> diff --git a/bundled/include/LibreOfficeKit/LibreOfficeKit.h b/bundled/include/LibreOfficeKit/LibreOfficeKit.h index 78f2b478e..2ca8631ed 100644 --- a/bundled/include/LibreOfficeKit/LibreOfficeKit.h +++ b/bundled/include/LibreOfficeKit/LibreOfficeKit.h @@ -262,6 +262,14 @@ struct _LibreOfficeKitDocumentClass int* pFontWidth, int* pFontHeight); + /// @see lok::Document::renderFontOrientation(). + unsigned char* (*renderFontOrientation) (LibreOfficeKitDocument* pThis, + const char* pFontName, + const char* pChar, + int* pFontWidth, + int* pFontHeight, + int pOrientation); + /// @see lok::Document::getPartHash(). char* (*getPartHash) (LibreOfficeKitDocument* pThis, int nPart); diff --git a/kit/DummyLibreOfficeKit.cpp b/kit/DummyLibreOfficeKit.cpp index 1c70ce2ea..323da0e43 100644 --- a/kit/DummyLibreOfficeKit.cpp +++ b/kit/DummyLibreOfficeKit.cpp @@ -122,6 +122,12 @@ static unsigned char* doc_renderFont(LibreOfficeKitDocument* pThis, const char *pChar, int* pFontWidth, int* pFontHeight); +static unsigned char* doc_renderFontOrientation(LibreOfficeKitDocument* pThis, + const char *pFontName, + const char *pChar, + int* pFontWidth, + int* pFontHeight, + int pOrientation); static char* doc_getPartHash(LibreOfficeKitDocument* pThis, int nPart); static size_t doc_renderShapeSelection(LibreOfficeKitDocument* pThis, char** pOutput); @@ -170,6 +176,7 @@ LibLODocument_Impl::LibLODocument_Impl() m_pDocumentClass->getViewIds = doc_getViewIds; m_pDocumentClass->renderFont = doc_renderFont; + m_pDocumentClass->renderFontOrientation = doc_renderFontOrientation; m_pDocumentClass->getPartHash = doc_getPartHash; m_pDocumentClass->renderShapeSelection = doc_renderShapeSelection; @@ -527,6 +534,22 @@ unsigned char* doc_renderFont(LibreOfficeKitDocument* /*pThis*/, return nullptr; } +unsigned char* doc_renderFontOrientation(LibreOfficeKitDocument* /*pThis*/, + const char* pFontName, + const char* pChar, + int* pFontWidth, + int* pFontHeight, + int pOrientation) +{ + (void) pFontName; + (void) pChar; + (void) pFontWidth; + (void) pFontHeight; + (void) pOrientation; + + return nullptr; +} + static size_t doc_renderShapeSelection(LibreOfficeKitDocument* pThis, char** pOutput) { (void) pThis; diff --git a/kit/Watermark.hpp b/kit/Watermark.hpp index 40d6c35d3..79fd5fb2c 100644 --- a/kit/Watermark.hpp +++ b/kit/Watermark.hpp @@ -114,7 +114,7 @@ private: // are always set to 0 (black) and the alpha level is 0 everywhere // except on the text area; the alpha level take into account of // performing anti-aliasing over the text edges. - unsigned char* textPixels = _loKitDoc->renderFont(_font.c_str(), _text.c_str(), &_width, &_height); + unsigned char* textPixels = _loKitDoc->renderFont(_font.c_str(), _text.c_str(), &_width, &_height, 450); if (!textPixels) { _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits