bundled/include/LibreOfficeKit/LibreOfficeKit.h | 8 ++++++++ kit/DummyLibreOfficeKit.cpp | 23 +++++++++++++++++++++++ kit/Watermark.hpp | 2 +- 3 files changed, 32 insertions(+), 1 deletion(-)
New commits: commit e70bdc3c9c44c0bb19aa241c7e81e339a84bb50b Author: mert <mert.tu...@collabora.com> AuthorDate: Thu Oct 24 12:13:46 2019 +0300 Commit: Andras Timar <andras.ti...@collabora.com> CommitDate: Thu Nov 28 00:20:02 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> (cherry picked from commit 2c598ba4ef8015e9fd2a5a6ffe9fa064dbbead4e) Reviewed-on: https://gerrit.libreoffice.org/83934 Reviewed-by: Andras Timar <andras.ti...@collabora.com> Tested-by: Andras Timar <andras.ti...@collabora.com> diff --git a/bundled/include/LibreOfficeKit/LibreOfficeKit.h b/bundled/include/LibreOfficeKit/LibreOfficeKit.h index 78a452a84..681556690 100644 --- a/bundled/include/LibreOfficeKit/LibreOfficeKit.h +++ b/bundled/include/LibreOfficeKit/LibreOfficeKit.h @@ -256,6 +256,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 edeb15d7d..15d410dba 100644 --- a/kit/DummyLibreOfficeKit.cpp +++ b/kit/DummyLibreOfficeKit.cpp @@ -118,6 +118,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); @@ -166,6 +172,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; @@ -523,6 +530,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 b9364f795..3223f0590 100644 --- a/kit/Watermark.hpp +++ b/kit/Watermark.hpp @@ -110,7 +110,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