summaryrefslogtreecommitdiff
path: root/drawinglayer
AgeCommit message (Collapse)AuthorFilesLines
2016-06-10tdf#99519 Added more intelligent handling of animated GIFsArmin Le Grand2-139/+386
Isolated to a single Primitive2D class based on the AnimatedSwitch- Primitive2D which does the specializing in one place. Buffers small GIFs completely, handles 1st frame always buffered, huge GIFs get animated by just playing he next frame. To reach more with the current approach we would have to re-implement AnimatedGIF import, replay it internally on a sys-specific Surface and blit the current content (with alpha) to our display Reviewed-on: https://gerrit.libreoffice.org/26103 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit 285744fef87f4ca0278834b97d7f618bdba5f4c0) Change-Id: I46c3325fa7936df73bea9a9284a0421f1475a34b
2016-06-01tdf#95581: Assume tiny shears are rounding artefacts etc and can be ignoredTor Lillqvist1-1/+4
See bug report for more discussion. Change-Id: I50ee82abac4ddfbdca0fb03d17c0518860466a52 Reviewed-on: https://gerrit.libreoffice.org/25766 Reviewed-by: Tor Lillqvist <tml@collabora.com> Tested-by: Tor Lillqvist <tml@collabora.com>
2016-05-25Convert Disposal to scoped enumNoel Grandin1-8/+3
and drop unused FULL value Change-Id: I3b9c26cb164785ef86f1a8d57cce962b015c85d6 Reviewed-on: https://gerrit.libreoffice.org/25432 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-25Fix typosAndrea Gelmini2-2/+2
Change-Id: I860cc4aa04b4e5cd1437b2f24176ee2ccdec3266 Reviewed-on: https://gerrit.libreoffice.org/25420 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-23Convert GradientStyle to scoped enumNoel Grandin6-30/+30
Change-Id: I1da151dd25648e363ba88bf88caa3e820f0ee424 Reviewed-on: https://gerrit.libreoffice.org/25270 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-23Convert HatchStyle to scoped enumNoel Grandin7-21/+21
Change-Id: I27878a67457d32e6922dfb6da73f896ff6ab1d01 Reviewed-on: https://gerrit.libreoffice.org/25271 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-22Convert BreakupUnit to scoped enumNoel Grandin2-5/+5
Change-Id: Icda4584c79a8af2c2e5fc5a29c498f7869641aa5 Reviewed-on: https://gerrit.libreoffice.org/25299 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-22Convert SpreadMethod to scoped enumNoel Grandin1-9/+9
Change-Id: I2a04247bd58ed6f2af8da7e109b31ff83d6d5e49 Reviewed-on: https://gerrit.libreoffice.org/25298 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-22Convert HelplineStyle2D to scoped enumNoel Grandin1-2/+2
Change-Id: I32b3c61ed40fe041a395544c1ab32d8e1b5f89fa Reviewed-on: https://gerrit.libreoffice.org/25297 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-18update unusedmethods plugin to deal with constructorsNoel Grandin5-57/+0
and fix the operator< implementations in some of the other plugins too. Change-Id: Ie5631e0cdc8d2a994ad2af2533cdb558a6cfc035 Reviewed-on: https://gerrit.libreoffice.org/25057 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-12Massage code to avoid warningsStephan Bergmann1-6/+3
Change-Id: I847e1a109bd20e64161a7735ee30b2fe1ca507b0
2016-05-11Use SAL_FALLTHROUGH where intendedStephan Bergmann1-0/+4
As discussed on IRC: <alg> sberg: intended - double includes the lines from single, aka triple <alg> sberg: Okay, please add comments there. I was referring to FillHatchPrimitive2D::create2DDecomposition where the same switch is used Change-Id: Ie007bdb54a56ead1b9139451d20f2ea6aa7e6f20
2016-05-11Include cppumaker-generated .hpp, not .hdlStephan Bergmann1-1/+1
Change-Id: Ib0451f26edbfbcdfdca78caa97bd09bc65ec2782
2016-05-10Replace fallthrough comments with new SAL_FALLTHROUGH macroStephan Bergmann2-4/+4
...which (in LIBO_INTERNAL_ONLY) for Clang expands to [[clang::fallthrough]] in preparation of enabling -Wimplicit-fallthrough. (This is only relevant for C++11, as neither C nor old C++ has a way to annotate intended fallthroughs.) Could use BOOST_FALLTHROUGH instead of introducing our own SAL_FALLTHROUGH, but that would require adding back in dependencies on boost_headers to many libraries where we carefully removed any remaining Boost dependencies only recently. (At least make SAL_FALLTHROUGH strictly LIBO_INTERNAL_ONLY, so its future evolution will not have any impact on the stable URE interface.) C++17 will have a proper [[fallthroug]], eventually removing the need for a macro altogether. Change-Id: I342a7610a107db7d7a344ea9cbddfd9714d7e9ca
2016-05-09convert FONT_EMPHASIS_MARK to scoped enumNoel Grandin3-19/+20
Change-Id: I137c78b337e57d3442db08334128e79d186b278f Reviewed-on: https://gerrit.libreoffice.org/24753 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-06Refactor 3D renderer to use multithreadingArmin Le Grand5-296/+363
This try uses full 3D renderers working on the same ZBuffer target, but are capable to render one stripe per thread. This is rougher in granularity and uses multiple cores better than the first try (see gerrit 24393) which was too fine-granular being based on scanline render parallelization. SecUred some more classes based on SdrPrimitive3D for multi- theaded usage (places where local buffered stuff is done) Change-Id: I4ddd5885ad41dd6432d0695e528818a86e427bfd Reviewed-on: https://gerrit.libreoffice.org/24538 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Reviewed-by: Armin Le Grand <Armin.Le.Grand@cib.de>
2016-05-02Fix typosAndrea Gelmini1-1/+1
Change-Id: I38b5e720af67d0bfb1be72ff82a7f5c595a94c14 Reviewed-on: https://gerrit.libreoffice.org/24535 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: jan iversen <jani@documentfoundation.org>
2016-05-01Complete drawinglayer attributesArmin Le Grand5-0/+57
All DrawingLayer Atrributes used for ptimitives need a default constructor. Since the o3tl::cow_wrapper is used in combination with a static default incarnation of the impl class it is better to define that. Also needed is a working isDefault() implementation that compares the impl class to the static default. Added missing stuff for this. Change-Id: I98e9fee7343112cd979b972229423ac0ef3994a6 Reviewed-on: https://gerrit.libreoffice.org/24496 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Armin Le Grand <Armin.Le.Grand@cib.de>
2016-04-26loplugin:defaultparamsTor Lillqvist1-2/+2
Not necessary to pass this argument, it defaults to the same value. Change-Id: I090566ebc968c69351cd019e1a5b2b6a0749f03f
2016-04-26tdf#48066 render stroke-miterlimit correctly in SVG importRegina Henschel4-9/+29
The property stroke-miterlimit is transported to the renderers via a new member mfMiterMinimumAngle in class LineAttribute Several drawPolyLine methods are adapted. This patch does not include changes in MetaAction. Presentation mode, printing, and PDF-export is still wrong. Corrected LineJoinMiter to LineJoinBevel in canvas, that s closer to NONE. Removed DrawPolyLine method without MiterMinimumAngle and adapted calls accordingly. Change-Id: I6bcd24add5d85c4d9a39e3788e0682091c5fc9c4 Reviewed-on: https://gerrit.libreoffice.org/23946 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Armin Le Grand <Armin.Le.Grand@cib.de> Reviewed-by: Regina Henschel <rb.henschel@t-online.de>
2016-04-26update loplugin stylepolice to check local pointers varsNoel Grandin1-6/+6
are actually pointer vars. Also convert from regex to normal code, so we can enable this plugin all the time. Change-Id: Ie36a25ecba61c18f99c77c77646d6459a443cbd1 Reviewed-on: https://gerrit.libreoffice.org/24391 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-04-25clang-tidy modernize-loop-convert in d*Noel Grandin6-26/+25
Change-Id: I0830a41b48e884ef63d32b5873c7007195659bb9
2016-04-21new plugin stylepoliceNoel Grandin1-12/+12
check for local variables which follow our member field naming convention, which is highly confusing Change-Id: Idacedf7145d09843e96a584237b385f7662eea10
2016-04-20loplugin:salbool: Automatic rewrite of sal_False/TrueStephan Bergmann2-4/+4
Change-Id: I8130752ca7ccd47cda91458e39fbb56470ee38e5
2016-04-19drawinglayer: fix Android-specific typoMiklos Vajna1-1/+1
The intention is to call the real function, not the template itself. Change-Id: Ib10ac4877b33554fe3a5c0918de43bea6e62cfc9
2016-04-19drawinglayer: work around broken Android toolchainMiklos Vajna1-0/+11
Change-Id: I8679f44663aa81e04684751847cab4f06df3a71e
2016-04-19Missing include for std::roundStephan Bergmann1-1/+3
Change-Id: Id9e67f800192eb9ddbf79960d4b17012531d0e08
2016-04-19drawinglayer, sw: indentation fixesMiklos Vajna1-1/+1
Change-Id: Ia84182629f33220a0d85bde00c16f9c26f45e3c5
2016-04-18tdf#99315 VclPixelProcessor2D: fix double border line widthMiklos Vajna4-5/+104
Regression from commit 2c91cb08d65cd35fa8ef6eaca3677aa82fb58cbe (better drawing support for borders of different width, fdo#33634, 2012-04-04), the problem is that previously the width of inner/outer double border lines got rounded to integer values quite early, but after the commit they are kept at a double precision for much longer, which needs pixel correction in VclPixelProcessor2D. Example: if the border with is 1.47, and the line gets moved by 0.2 pixels, then the inner and outer edge of the line will be 0.2 and 1.67, which gets rounded to 0 -> 2 in the pixel processor. Previously the input was rounded to 1, so moving by 0.2 resulted in 0.2 -> 1.2, which got rounded to 0 -> 1. The result is that sometimes the line width is 1 pixel wider than expected. Fix the problem by allowing VclPixelProcessor2D to request pixel correction from BorderLinePrimitive2D. It wouldn't be possible to do pixel correction only in VclPixelProcessor2D, as it has no idea what to correct: it only gets polygons, so it has no idea if e.g. the top of a polygon is the outer edge of a top border line or an inner edge of a bottom border line. Change-Id: I1971f3a952fbcdc598ab46c659e12d976c13cbe6 Reviewed-on: https://gerrit.libreoffice.org/24221 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2016-04-18clang-tidy performance-unnecessary-copy-initializationNoel Grandin10-16/+12
probably not much performance benefit, but it sure is good at identifying leftover intermediate variables from previous refactorings. Change-Id: I3ce16fe496ac2733c1cb0a35f74c0fc9193cc657 Reviewed-on: https://gerrit.libreoffice.org/24026 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-04-15drawinglayer: fix WNT buildMichael Stahl1-0/+1
Change-Id: I0a545008e1bd7f99fe1f928b4cd42fbcfdc85517
2016-04-15loplugin:refcountingStephan Bergmann1-2/+3
Change-Id: I4f696bdb7b37da5949182d522b0d3c6c41fdc756
2016-04-15Related: tdf#99315 BorderLinePrimitive2D: fix solid line primitive widthMiklos Vajna4-1/+122
Regression from commit 2c62596cf264ef10749d8bfdb2bb2ebef2d98fbc (fdo#75260: Correctly draw double lines for both Writer and Calc., 2014-03-03), the problem was that when decomposing a double border line promitive to solid line primitives (which happens for the legacy "border" type, while both the Calc UI and Excel importer creates "border-thin" ones), the decomposed inner line's height was larger than the requested width. As a result there was no gap between the polygon of the inner and the outer line of the double border, looking like a non-double border. The width of the outer border is still incorrect on the screen, though. Change-Id: Ia9713c315ce8f23e2579b257169798e7c82c0a64 Reviewed-on: https://gerrit.libreoffice.org/24115 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2016-04-13tdf#94306 remove unused boost dependenciesJochen Nitschke1-1/+0
remove <boost/noncopyable.hpp> in pch and remove boost from makefile if it was the only boost entry. Change-Id: Icb945ae59c137571f4f63807601738eea5c3e831 Reviewed-on: https://gerrit.libreoffice.org/24061 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2016-04-11clang-tidy performance-unnecessary-value-param in drawinglayerNoel Grandin3-60/+60
Change-Id: I59d65ba81afab41e781f9dea5339a01d7918c51c
2016-04-08tdf#94306 replace boost::noncopyable in d...Jochen Nitschke2-7/+16
dbaccess, desktop and drawinglayer. Replace with C++11 delete copy-constructur and copy-assignment. Nothing special, only one unused include in dbaccess/source/filter/xml/xmlfilter.cxx. Change-Id: Iebabbc658215162450d4caf08d4fb2f116c456d9 Reviewed-on: https://gerrit.libreoffice.org/23918 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: David Tardon <dtardon@redhat.com>
2016-03-23loplugin:constantparam in drawinglayerNoel Grandin3-12/+7
Change-Id: I93b14a4ced909fa87bc3ad69d6fe9741a218018f
2016-03-10loplugin:constantparam in drawinglayerNoel Grandin1-4/+2
Change-Id: Id0d212ff212e6ac8a2a4ab9a2552f8f8e975371e
2016-02-17Fix missing iterator include on MSVC 14.0David Ostrovsky1-0/+1
Change-Id: I55de612aef52038fd9979426950d4ae4131ca586 Reviewed-on: https://gerrit.libreoffice.org/22448 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: David Ostrovsky <david@ostrovsky.org>
2016-02-17use consistent #define checks for the Windows platformNoel Grandin1-3/+3
stage 2 of replacing usage of various checks for the windows platform with the compiler-defined '_WIN32' macro In this stage we focus on replacing usage of the WIN macro Change-Id: Ie8a4a63198a6de96bd158ecd707dadafb9c8ea84 Reviewed-on: https://gerrit.libreoffice.org/22393 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-02-16use consistent #define checks for the Windows platformNoel Grandin1-3/+3
stage 1 of replacing usage of various checks for the windows platform with the compiler-defined '_WIN32' macro Change-Id: Iece73abdee530937e0737190b1aa97a46cd3075f Reviewed-on: https://gerrit.libreoffice.org/22390 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2016-02-13vcl: include vcl headers via triangular brackets instead of quotesChris Sherlock1-2/+2
Change-Id: I311f7db622ce341527fe12a92b516f800b602f92
2016-02-09Remove excess newlinesChris Sherlock106-230/+0
A ridiculously fast way of doing this is: for i in $(pcregrep -l -M -r --include='.*[hc]xx$' \ --exclude-dir=workdir --exclude-dir=instdir '^ {3,}' .) do perl -0777 -i -pe 's/^ {3,}/ /gm' $i done Change-Id: Iebb93eccbee9e4fc5c4380474ba595858a27ac2c Reviewed-on: https://gerrit.libreoffice.org/22224 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
2016-02-08Fix typosAndrea Gelmini1-1/+1
Change-Id: I4586168d3af81f047a4ded59fc6d257f17554885 Reviewed-on: https://gerrit.libreoffice.org/22194 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: jan iversen <jani@documentfoundation.org> Tested-by: jan iversen <jani@documentfoundation.org>
2016-02-08loplugin:unusedmethodsNoel Grandin2-42/+0
using an idea from dtardon: <dtardon> noelgrandin, hi. could you try to run the unusedmethods clang plugin with "make build-nocheck"? that would catch functions that are only used in tests. e.g., i just removed the whole o3tl::range class, which has not been used in many years, but htere was a test for it... <noelgrandin> dtardon, interesting idea! Sure, I can do that. Change-Id: I5653953a426a2186a1e43017212d87ffce520387 Reviewed-on: https://gerrit.libreoffice.org/22041 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-02-06vcl: bmpacc.hxx -> bitmapaccess.hxxChris Sherlock3-3/+3
Change-Id: I4bb19d6103c4a6a902d86b62a857e3478493924c
2016-02-06vcl: split exception types from input typesChris Sherlock1-6/+4
Having them in the file apptypes.hxx isn't necessary helpful, IMO so I've split the types into inputtypes.hxx and exceptiontypes.hxx Change-Id: I89a1ff168c3ae276b2f5486669d4ec2dda062d57
2016-02-05Fix typosAndrea Gelmini1-1/+1
Change-Id: Ice72f8d9971e15dd6ef365e64cd567b8581a92d3 Reviewed-on: https://gerrit.libreoffice.org/21797 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
2016-02-04vcl: take into account the font width is the average font widthChris Sherlock4-15/+15
I'm changing the Font class function names: - SetSize -> SetFontSize - GetSize -> GetFontSize - SetHeight -> SetFontHeight - GetHeight -> GetFontHeight - SetWidth -> SetAverageFontWidth - GetWidth -> GetAverageFontWidth That's because it really makes no sense to say that there is a single constant font width because obviously proportional fonts don't have one - the best we can do is an average font width, which is what folks like Microsoft sort of do already. On a fixed font, the average is still accurate, for obvious reasons :-) I'm also not a fan of GetSize/SetSize as I find it a might too generic. Change-Id: Ib80a604ba62d6883fd6cbc7994da763976be5c70 Reviewed-on: https://gerrit.libreoffice.org/22069 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
2016-02-02remove B2DLineJoin::MiddleCaolán McNamara2-5/+3
and consistently map css::drawing::LineJoint_MIDDLE to the same thing that css::drawing::LineJoint_MITRE points to everywhere else Change-Id: I77b7586ea13f3fe84c0529172758256666488d36