summaryrefslogtreecommitdiff
path: root/include/basegfx
AgeCommit message (Collapse)Author
2021-01-08opacity->alpha in BPixelNoel
They are basically the same thing, but alpha is the preferred term these days. Also improve the mixing algorithm, 1 - opacity is 255 - opacity not 256 - opacity since the range of sal_uInt8 is 0..255 Change-Id: I8788ac79285ab25c8d322b05817dffd3745fd699 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108963 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-21tdf#123936 Formatting files in module include with clang-formatPhilipp Hofer
Change-Id: I0507dd797cd5a35e0ae14f4b69ee4e172d08a71a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105681 Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> Tested-by: Jenkins
2020-10-28std::set->o3tl::sorted_vector in PointIndexSetNoel Grandin
Change-Id: I223a00b66f6de75eb06969a6d4582200e8229e2f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104900 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-10-21use tools::Long in basegfx..chart2Noel
Change-Id: Ide4014348d51f0b5f59e1e91b8d41c7748853254 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104608 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-09-26revert recent Polygon commitsNoel Grandin
This reverts commit 0cabffc05f3b40f5ee897df73475e09a3c05fc7 tools::PolyPolygon -> basegfx in canvas and commit 2c5d5a6d55a1ebd153f05523972a2c625484bde2 tools::PolyPolygon -> basegfx in filter Comment from quikee: The interpretation of integer polygons and floating point polygons (or any other float vs. int drawing primitives) are different, so you have to be really careful when changing, that the result after the change is still the same. A big problem is that we still have the metafile in OutputDevice, which is completely integer based - so there will be conversions that go from int representation to float representation to int again and to float (because backend is in floating point) and I really fear that because of this there will be regressions and even if not, it could make changing later more painful. This is the reason I wouldn't change these things without having tests that would show when there is a difference in rendering. Change-Id: I54addca4e5a72196b5f77f6c7689eb716451c1dd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103483 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-09-26tools::PolyPolygon -> basegfx in filterNoel Grandin
which needed an extra method on OutputDevice. Also add some utility methods to make future conversion work easier. Change-Id: I57c5bc7505e656a014f2e723fea2aa79271e6515 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103415 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-09-02drop unused MinimalSystemDependentDataManagerCaolán McNamara
Change-Id: I6e5413bb79acac93abfb8398550c157e7b667a67 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101942 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-08-19Fix typosAndrea Gelmini
Change-Id: Ideee477b0c8f0d472a607ed69ba51351d87f61bc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101010 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins
2020-07-16compact namespace: basegfx,canvasNoel Grandin
Change-Id: Idc808459b403bcdcccbd86b73dd22b424e507c8e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98897 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-07-13tdf#42949 Fix IWYU warnings in include/[a-r]*/*hxxGabor Kelemen
Recheck after 7-0 branchoff Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I7f5c35474b671facbda85a9538462dd4291add91 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97655 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-06-30Upcoming improved loplugin:staticanonymous -> redundantstatic: basegfxStephan Bergmann
Change-Id: I66b7e0fd74c7ce57cd2859e189caadb84be4d541 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97521 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-05-29loplugin:simplifybool in hwpfilter..lotuswordproNoel Grandin
Change-Id: Iedfd492c963eb89fe75fdd73cae630e7e1dae119 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95100 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-05-29improve pahole script and pack a few classesNoel Grandin
(*) fix: I was substracting the padding space instead of adding it when calculating how much free space we had to improve. (*) sort input data, so we process structs located in the same DSO together, which reduces GDB's memory usage (*) handle another error condition, where gdbs output is sufficiently mixed up that we miss the end of commands terminator Change-Id: Ic4bb92b736f38a2b3d90e4a14485152b7f869b43 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95041 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-05-14Some vtables are still needed outside mergedlibStephan Bergmann
...with a combination of --enable-mergelibs and --disable-optimized (see e.g. <https://ci.libreoffice.org/job/lo_tb_random_config_linux/2368/>): > /usr/bin/ld: workdir/CxxObject/sw/source/core/unocore/unodraw.o: in function `svx::IPropertyValueProvider::IPropertyValueProvider()': > unodraw.cxx:(.text._ZN3svx22IPropertyValueProviderC2Ev[_ZN3svx22IPropertyValueProviderC5Ev]+0xb): undefined reference to `vtable for svx::IPropertyValueProvider' > /usr/bin/ld: workdir/CxxObject/sw/source/uibase/docvw/PageBreakWin.o: in function `basegfx::BColorModifier::BColorModifier()': > PageBreakWin.cxx:(.text._ZN7basegfx14BColorModifierC2Ev[_ZN7basegfx14BColorModifierC5Ev]+0xb): undefined reference to `vtable for basegfx::BColorModifier' > collect2: error: ld returned 1 exit status > make[1]: *** [sw/Library_sw.mk:20: instdir/program/libswlo.so] Error 1 Change-Id: I1e41ddd8a6c8aa4f7fe2f02adde89034a3cd3c07 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94204 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-05-12basegfx: simplify namespaces in ALL basegfx headersTomaž Vajngerl
Change-Id: Iaf9426507e3822363e69dff2cae2b22f34b1b26c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94034 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2020-05-12use pragma once in include/basegfx headersTomaž Vajngerl
Change-Id: Ief442ff36927b9b14d76d72b25a6cec3d481fb2d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94033 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2020-05-03use more compact namespace syntax in /includeNoel Grandin
excluding the UDK headers of course Change-Id: Iac7ab83d60265f7d362c860776f1de9d5e444ec0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93268 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-04-22tdf#42949 Simplify use of rtl::math::approxEqual in include/basegfx/Gabor Kelemen
Turns out we can save about 500Mb of preprocessor input if we use rtl_math_approxEqual from rtl/math.h instead of its C++ wrapper rtl::math::approxEqual from rtl/math.hxx and manage the fallout accordingly. Before: bin/includebloat.awk | head sum total bytes included (excluding system headers): 19017296671 After: $ bin/includebloat.awk | head sum total bytes included (excluding system headers): 18535432672 Change-Id: I1691171f3a309405a7099882ad9989d147f59118 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92508 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-03-30remove Matrix class from basegfx, convert B2DHomMatrix testsTomaž Vajngerl
The common test cases of MAtrix and B2DHomMatrix are just converted into additional test cases for B2DHomMatrix. Change-Id: I8ed2f6d25263797b21a844e209e910a8a3f2a347 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91342 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2020-03-29basegfx: Fix the problem with Matrix Concatinate and TransformTomaž Vajngerl
In Concatinate and Transform methods we change the instance variables during calculation (matrix multiplication), which leads to the wrong result. This change fixes both calculations. Change-Id: I9f7ef7323707df1ab4a764f97f9bae8593c42940 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91311 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2020-03-29basegfx: add convenience access. and creator to B2DHomMatrixTomaž Vajngerl
In SVG, CSS, HTML Canvas it is usual to define a matrix with a,b,c,d,e,f attributes, where the values correcpond to the following: [a,c,e] [b,d,f] [0,0,1] This change adds accessors and creator to B2DHomMatrix, so it is easier to deal with other matrices that are defined like that. Change-Id: I6927513b1a70ad5eb70d7fe14a00de4a767f176a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91310 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2020-03-29add convenience accessors to Matrix.hxxTomaž Vajngerl
Change-Id: Ifaaff3b1526aed111725a46c6cc64c189909a904 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91309 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2020-03-29basegfx: export B2DRange operator*=Tomaž Vajngerl
Change-Id: Ia2e72e6650b14d5d024b65b1261876885cf1b05a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91308 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2020-03-28svdpdf: move Matrix to basegfx just to get it separatedTomaž Vajngerl
Change-Id: I9d887dc7a2836b90151ef352b47a9b9ad3b6f12b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91280 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2020-03-23make more classes private in mergedlibs modeNoel Grandin
Change-Id: I486922d0652f26fa7ee56f5fe308e19fe5ff137e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90856 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-03-07Fix typoAndrea Gelmini
Change-Id: Iae11728865c307355b610dc3169d15ae40988f0e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90142 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2020-03-06basegfx: B2DTuple replace operator[] with "get" and Axis2D enumTomaž Vajngerl
opertaor[] was used for index access of of x and y variables where 0 is x and 1 is y - similar like access to an array with 2 elements. This comes in handy when you write generic code where the algorithm is the same for x and y, but using index access operator doesn't look clean and is potentially dangerous. We know we only have 2 options (o and 1), but an index access allows for more. A solution to this is to have a normal "get" method, with an enum as parameter (Axis2D), which can only have values X or Y. Change-Id: I3f98d0149214808a336f25599350a78436236827 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90133 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2020-02-14Fix typoAndrea Gelmini
Change-Id: I314345471928d61b11cc88858f84146534c74d9a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88746 Tested-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2020-02-14tdf#130655 callback interface for 3D and secure dashArmin Le Grand
Added same interface for 3D but just for lines, it uses no gaps. Added the security mechanism mentioned in the task in comment (2) to 2D and 3D Change-Id: I5da303c01562088682d95ee4f294c99e1f17bf6b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88728 Tested-by: Jenkins Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2020-02-14tdf#130655 added callback interface to ::applyLineDashingArmin Le Grand (Collabora)
This version of the tooling method allows to avoid collecting line snippets in a return value PolyPolygon. Instead, offer lambda functions to get callbacks for created snippets. The original method using a B2DPolyPolygon return value is adapted to already use this, so serves as example of usage and ensures that only one identical algorithm is used. Change-Id: Ie306968a895ad280fc2425fb40b3244769216ba0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88684 Tested-by: Jenkins Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2020-02-07tdf#130478 Enhance Dashed line drawing on all systemsArmin Le Grand (Collabora)
For more info and explanation including state of process information and discussion(s) see task please. Adding corrections for gerrit build Change-Id: Ie10fb8093a86459dee80db5ab4355b47e46c1f8c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88130 Tested-by: Jenkins Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2020-02-03tdf#96505: Get rid of cargo cult long integer literalsiakarsu
Change-Id: I3917e5152036f77eb419fe658937562f5928ceff Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87614 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-02-03loplugin:constantparamNoel Grandin
Change-Id: If2dee122bf07dc179fd8f6e766442ec1891a5f3d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87845 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-01-30tdf#124176: Use pragma once instead of include guardsbugrakurt
Change-Id: Ia353a95df0e78e9da2b6fb95c2bc3a6e83c72fcd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87738 Tested-by: Jenkins Reviewed-by: Muhammet Kara <muhammet.kara@collabora.com>
2020-01-30tdf#124176: Use pragma once instead of include guardsbugrakurt
Change-Id: I15f9cbce2344cebbe73a915758ce1631f46d7da8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87721 Tested-by: Jenkins Reviewed-by: Muhammet Kara <muhammet.kara@collabora.com>
2020-01-26tdf#124176: Use pragma once instead of header guardPelin Kuran
Change-Id: I55ca953de1d0c4eea1df802e66b0c8d9468d5126 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87381 Reviewed-by: Muhammet Kara <muhammet.kara@collabora.com> Tested-by: Muhammet Kara <muhammet.kara@collabora.com>
2020-01-25tdf#130137 Replace remaining uses of WNT define checks with _WIN32A_GAN
Change-Id: If95f1ea5a81de62eb4f725e5fcb30ccb8530062a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87372 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-01-23tdf#129845: Better solution using already existing infoArmin Le Grand
Use calculateCombinedHoldCyclesInSeconds() in central places of system-dependent buffering and the zero value to early exclude data from buffering. This solves the problem on all system-dependent usages in a central place. Also enhanced to roughly allow buffering for bitmaps unchanged, for polygons starting with ca. 50 coordinate pairs. Added special treatments to Cairo version to allow temp buffer objects without copying the path data. This needed some extra stuff due to Cairo not allowing to work with it's cr-internal path object directly. Change-Id: Icd0a0d8091707fe356a82f5c7ec48f36ad44ccde Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87199 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Jenkins
2019-12-18sal_Char->char in avmedia..basicNoel Grandin
Change-Id: Ied1331d979539ef1183da64c55351b57d24f4a4f Reviewed-on: https://gerrit.libreoffice.org/85371 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-12-17loplugin:expandablemethodsNoel Grandin
Change-Id: Ifc269d9996928085a3ab78033788465b4f029368 Reviewed-on: https://gerrit.libreoffice.org/85255 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-12-03Simplify a bit B2DPolyRange::appendElement (basegfx)Julien Nabet
push_back is more optimized than an insert Change-Id: I8932c4ee61569b5eee3d5dbc5fbfd8eff624d061 Reviewed-on: https://gerrit.libreoffice.org/84276 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-11-15make some classes module-privateNoel Grandin
Change-Id: I95845d7217fc5e77e3f8e205030e9cd761ad0cc5 Reviewed-on: https://gerrit.libreoffice.org/82116 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-11-10cid#1455328 initialize variables to 0.0 in LinearGradientInfoTomaž Vajngerl
Change-Id: I7232f5406ca019fa0634a7b6a69536c87ba46430 Reviewed-on: https://gerrit.libreoffice.org/82380 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2019-11-08Removed duplicated includeAndrea Gelmini
Change-Id: Ic1a492d7520753baa7092e30e8f37f7f024908ed Reviewed-on: https://gerrit.libreoffice.org/82318 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2019-11-08widget theme: Gradient support when drawing widgetsTomaž Vajngerl
Change-Id: I29239348e36e4963d9708a22ac649b2b1d68bf02 Reviewed-on: https://gerrit.libreoffice.org/82207 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2019-11-03Cleanup copypasteMike Kaganski
Change-Id: I9b2ed3d806868689cf9f573ca5e841e3d35e644e Reviewed-on: https://gerrit.libreoffice.org/81957 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-10-28loplugin:finalclasses in avmedia..basicNoel Grandin
Change-Id: Ia54364237149fac38e6ebcc5fcf9933d0ccf5984 Reviewed-on: https://gerrit.libreoffice.org/81619 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-10basegfx: warn on unused B2DVectorMiklos Vajna
This is similar to tools::Rectangle, doesn't do anything useful in its destructor. Change-Id: I761801a0cf6979e6611f4341b41445cb05d8925b Reviewed-on: https://gerrit.libreoffice.org/80566 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-09-29constmethod for accessor-type methodsNoel Grandin
Apply the constmethod plugin, but only to accessor-type methods, e.g. IsFoo(), GetBar(), etc, where we can be sure of that constifying is a reasonable thing to do. Change-Id: Ibc97f5f359a0992dd1ce2d66f0189f8a0a43d98a Reviewed-on: https://gerrit.libreoffice.org/74269 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-09-28loplugin:virtualdead in basegfxNoel Grandin
Change-Id: I8b3f7810eb08b5217df30b7be27aafadeeed247a Reviewed-on: https://gerrit.libreoffice.org/79647 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>