summaryrefslogtreecommitdiff
path: root/canvas
AgeCommit message (Collapse)Author
2016-04-13tdf#99165 always provide control points for beziersArmin Le Grand
Some graphic sub systems cannot handle cases where control points of bezier curves are not set and produce wrong geometry for fat line drawing when MITER or similar LineCap and/or LineJoin is used. To avoid that, provide the mathematically correct fallback control points instead. Change-Id: Iabc724e51fb89e702f858db820c920f7b5b7d302 Reviewed-on: https://gerrit.libreoffice.org/24031 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Armin Le Grand <Armin.Le.Grand@cib.de>
2016-04-11fix copy assignment signaturesJochen Nitschke
get value by reference introduced in commit 8c2f2e1dd77cdce9bdf63beff5a79f91adc44630 and commit f9b200ce54cd67ddc04747f9676568a86e14d864 Change-Id: Iba84dd752f4cbdde9f3676c434d107efabe63a38 Reviewed-on: https://gerrit.libreoffice.org/23974 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-04-07tdf#91794 remove OSL_DEBUG_LEVEL > 1 conditionalsRohan Kumar
I removed the OSL_DEBUG_LEVEL > 1 conditionals with OSL_DEBUG_LEVEL > 0 or SAL_INFO macros Change-Id: Ia2a483ea0f992bf182a6beed2b4558a4fb7c5680 Reviewed-on: https://gerrit.libreoffice.org/23079 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
2016-04-07tdf#94306 replace boost::noncopyable in canvasJochen Nitschke
Replace with C++11 delete copy-constructur and copy-assignment. Some helper classes had boost/noncopyable.hpp included but didn't use it. Change-Id: I339f2c413a944649d9d63c046e8b7f7ee6e46791 Reviewed-on: https://gerrit.libreoffice.org/23866 Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de> Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-03-25fix headless buildOliver Specht
disables OpenGL and glew usage, lets --without-gui do what --without-x did before and disables X related test Change-Id: I680b47c9962a0d43c8ece593db0b82e347ceebdb Reviewed-on: https://gerrit.libreoffice.org/23474 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Oliver Specht <oliver.specht@cib.de>
2016-03-03loplugin:unuseddefaultparams variousNoel Grandin
Change-Id: Ibf8489c957b307156689de4c7cb8440ddd4e4546 Reviewed-on: https://gerrit.libreoffice.org/22852 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-03-01-Werror,-WshadowStephan Bergmann
Change-Id: I007ea13a059d8b067e4819fb61f0ea2e15c638a5
2016-03-01-Werror,-Wnon-virtual-dtorStephan Bergmann
Change-Id: Ibeed52359852451b800e083ddc4c221dea41a294
2016-03-01-Werror,-Wunused-macrosStephan Bergmann
Change-Id: I0269ae5c13c75327648c0018007d78dbf37f1648
2016-02-25werror: declaration hides previous declarationDavid Ostrovsky
Change-Id: I0f8422a4f8c27ec253d917985d2593d8d87bb5f0 Reviewed-on: https://gerrit.libreoffice.org/22685 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
2016-02-25werror: declaration hides previous declarationDavid Ostrovsky
Change-Id: Ia0fe8847f2a58fbccb25ecc6237f3b14a08da076 Reviewed-on: https://gerrit.libreoffice.org/22688 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
2016-02-25werror: declaration of 'nWidth' hides previous declarationDavid Ostrovsky
Change-Id: Ida3b031f0425aae8d8372410311312b4d7a13d2f Reviewed-on: https://gerrit.libreoffice.org/22683 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
2016-02-24convert SpriteChangeRecord::ChangeType to scoped enumNoel Grandin
Change-Id: I29696f37a023317bdaa8f53d753ccaeb8e68a3c2
2016-02-24convert canvas::IRenderModule::PrimitiveType to scoped enumNoel Grandin
Change-Id: Idf2e7449ce5b595386f437597ce7ccf00d141db0 Reviewed-on: https://gerrit.libreoffice.org/22634 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-02-23convert canvas::IColorBuffer::Format to scoped enumNoel Grandin
Change-Id: I0013c0b14992062be97977bf00f4af89fb2766f5 Reviewed-on: https://gerrit.libreoffice.org/22633 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-02-23convert GradientType to scoped enumNoel Grandin
Change-Id: Icef1d8d38481022104a957ac9deac1c03dc2d6fb Reviewed-on: https://gerrit.libreoffice.org/22632 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-02-17Fix missing iterator include on MSVC 14.0David Ostrovsky
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 Grandin
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-09Remove excess newlinesChris Sherlock
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-06vcl: bmpacc.hxx -> bitmapaccess.hxxChris Sherlock
Change-Id: I4bb19d6103c4a6a902d86b62a857e3478493924c
2016-02-06vcl: rename EXC_* constants to EXCEPTION_*, EXC is too much like 'execute'Chris Sherlock
Change-Id: I2f79e0419b27391cc9bdc45576e67eecdbc9efa4
2016-02-04vcl: take into account the font width is the average font widthChris Sherlock
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 leftover printf-style %fTor Lillqvist
But seriously, who builds with OSL_DEBUG_LEVEL > 2? Either debugging printouts inside such ifdefs are completely pointless and should be removed, or then the information might actually be useful, and the ifdefs should be removed, so that the information can be selected to be printed using the normal SAL_LOG environment variable mechanism (in a build where SAL_INFO is functional). Change-Id: Ia5d2c7c7b525ed133fe3f077a005f583b8a856e7
2016-02-02tdf#43157: Fix format string violations in OSL_TRACE etc.aybuke
Change-Id: Idffbfb78b2386020fd099077a67bf8a89917bdab Reviewed-on: https://gerrit.libreoffice.org/21999 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-01-31boost::tuple -> std::tupleCaolán McNamara
Change-Id: Ia08c184b792ff73d3ed49d6a5d54dec1a35943e9 Reviewed-on: https://gerrit.libreoffice.org/21955 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2016-01-29vcl: add text alignment functions to ImplFont and FontAttributesChris Sherlock
ImplFont and FontAttributes now have GetAlignment and SetAlignment, and I have renamed Font::GetAlign to Font::GetAlignment, and Font::SetAlign to Font::SetAlignment. See commit description in 8bfccd3a71d911b6d ("vcl: Create accessor and mutator for font scaling in FontMetric") for reasoning behind patch. Unit test added to vcl/qa/cppunit/font.cxx to test text alignment. Change-Id: I6272c84fc9416c90616d957d1897eba9469fe7ba Reviewed-on: https://gerrit.libreoffice.org/21876 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
2016-01-28canvas: replace BOOST_CURRENT_FUNCTION with OSL_THIS_FUNCMichael Stahl
Change-Id: Ib90ad48866718f69160f57e7b0db3a7f342eb7be Reviewed-on: https://gerrit.libreoffice.org/21882 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2016-01-28Revert "canvas: replace BOOST_CURRENT_FUNCTION with __func__"Michael Stahl
This reverts commit d01f7db4b5f51d1be8ba210625f4ad1ebf5c6e8f. Revert "tools: replace BOOST_CURRENT_FUNCTION with __func__" This reverts commit 10303054067258016fbbae018ea848f74adc4964. Surprisingly MSVC 2013 does not support __func__ - need 2015. Change-Id: I7084d7b79784b34a8f40fb986d10ffefbabae7fb
2016-01-28canvas: replace BOOST_CURRENT_FUNCTION with __func__Michael Stahl
Change-Id: I384472894288081423ae9467cc439b10d637f6e0
2016-01-21loplugin: unused return valuesNoel Grandin
Change-Id: I4eb1f0c9245c04058fd5e47046f043f8840a79c7 Reviewed-on: https://gerrit.libreoffice.org/21628 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-01-17vcl: rename Font::GetName to Font::GetFamilyNameChris Sherlock
Change-Id: Ie20871a3078bf875c1782b7761d60591a9c9704f Reviewed-on: https://gerrit.libreoffice.org/21529 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
2016-01-16revert vcl patch series that brok Mac and WindowsNorbert Thiebaud
revert: 9bc2f3de8672e812f3a67541c6d7069b434a7e42 vcl: add comment about ImplFontMetric::{Get|Set}LineHeight() 26371f105bc44e04469ec03fc5bb12505e651c6b vcl: FontAttributes::GetSlantType() -> FontAttributes::GetItalic() 2dd0b4317372b8022efe3911b38b4fa02956d8b9 vcl: font.hxx and metric.hxx cleanup, make ctors explicit and the dtor virtual 5ab13bf3ead3539e4ad847656da81e7eb6029652 vcl: tabify font.hxx f99550dae55e40e49bf9c9875053fe2abb4c71ca vcl: change Font::SetName() to Font::SetFamilyName() 2b297116cb6bb1061c43e5714e2609c8ee9f57d2 vcl: rename Font::GetName to Font::GetFamilyName Change-Id: I23f38921187d66b970ca815eb30dda4222a2da62
2016-01-16vcl: rename Font::GetName to Font::GetFamilyNameChris Sherlock
Change-Id: I83927e0992dfe0a2a79d139818a9f45d3761aae5 Reviewed-on: https://gerrit.libreoffice.org/21509 Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com> Tested-by: Chris Sherlock <chris.sherlock79@gmail.com>
2016-01-13vcl: Create accessor and mutator for int and ext leading in FontMetricChris Sherlock
Accessor and mutator created for external and internal leading space in FontMetric. See commit description in 8bfccd3a71d911b6d ("vcl: Create accessor and mutator for font scaling in FontMetric") for reasoning behind patch. Unit tests - check to ensure that can set external and leading space - check equality operator on FontMetric after setting both external and internal leading space - enhanced tests to also check the inequality operator Change-Id: I973970dd0b0631c5eca3e89039dce57ac3a3eb63 Reviewed-on: https://gerrit.libreoffice.org/21454 Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com> Tested-by: Chris Sherlock <chris.sherlock79@gmail.com>
2016-01-08Remove useless extra var for loopJulien Nabet
Take benefit of returned iterator from erase method Change-Id: I77eaa5b4500cfc66ae66e5f388915e0ade79b23c Reviewed-on: https://gerrit.libreoffice.org/21239 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2016-01-07cppcheck: noExplicitConstructorCaolán McNamara
Change-Id: I94db78ca12e0f3389f00ea5c557f0b64d452f613 Reviewed-on: https://gerrit.libreoffice.org/21150 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2016-01-05new loplugin rangedforcopy - use reference in range based forAndrzej Hunt
Inspired by 6e6ae9803796b120e95f6e89575e03c5fd0ed3c2 Change-Id: Ia0f264d3a6bbf076aa5080e3398683e50bc6ef01 Reviewed-on: https://gerrit.libreoffice.org/20190 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2016-01-05Fix typosAndrea Gelmini
Change-Id: I1b79005d9c4e32325b8dadcc4f805975d6bf2727 Reviewed-on: https://gerrit.libreoffice.org/21103 Reviewed-by: Andras Timar <andras.timar@collabora.com> Tested-by: Andras Timar <andras.timar@collabora.com>
2015-12-21Resolves: tdf#93703 0 scaling is CAIRO_STATUS_INVALID_MATRIXCaolán McNamara
so more drawing to the surface fails prior to 4ac876084bb89b6460b31e090a666b395f66b1e8 we had a new cairo context each time to the error was thrown away along with the context and the new one would work Change-Id: I90ab1a943e8908e87f391bdfb8ccd5f3818e13d5
2015-12-03Use comphelper::containerToSequence()Noel Grandin
Change-Id: I18d6ef04ff00f971a4c54ba259733c07501c6c1a
2015-12-02Remove unused FMT_R8G8B8Stephan Bergmann
...since 5b4d4af3e8bc3b5fb07bceecefc2a47d8e4b8b18 "bin agg" Change-Id: If86d294f812a670917b181f3bd140883ad2df71d Reviewed-on: https://gerrit.libreoffice.org/20348 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
2015-11-28C++17 nested namespace definitionStephan Bergmann
Change-Id: I49fd2093d619743d0d5aaaa4784bd5ef5bb330c6
2015-11-28Unused forward declStephan Bergmann
Change-Id: Id332cdff634be042e026faf7cc75d8eaeb44a13e
2015-11-28-Werror,-Wunused-functionStephan Bergmann
Change-Id: Ic238339b521dbff2d7fbe899127ac7954036300f
2015-11-28-Werror,-Wunused-private-fieldStephan Bergmann
Change-Id: Ie14d3b3474b7886add80bd6e223e76fbf964144e
2015-11-28-Werror,-WreorderStephan Bergmann
Change-Id: I27eb5c497985267dd00b5be2fb3c17f8d79745cf
2015-11-28-Werror,-WreorderStephan Bergmann
Change-Id: I0a3384505d8ab7fe70c0dccb93a96d9d3e991367
2015-11-28-Werror,-Wunused-functionStephan Bergmann
Change-Id: I99246a9de5f266154f9927bff322a0a1697bcdee
2015-11-28-Werror,-Winconsistent-missing-overrideStephan Bergmann
Change-Id: I41d1e0d5e6263255426efb011c7b4bb5ae6775b5
2015-11-26expression result unused [-Werror,-Wunused-value]Noel Grandin
Change-Id: I57b44c1997ac286fcb4caf8e3027e3b5996fc377