Age | Commit message (Collapse) | Author |
|
I was too positive thinking that SalBitmap would be fine,
but it's locked to vcl. To be able to add system-dependent
BitmapBuffering I move the access to Bitmap now. This is
no functional change, but offers the same access as e.g.
B2DPolygon/B2DPolyPolygon offer already.
Also cleaned up usage/access to SystemDependentDataManager
which removes quite some code in constructors and makes
things easier in general.
Change-Id: I2baa40a12479fab0fe66063a018f058c6b8f5597
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141507
Tested-by: Jenkins
Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
|
|
Most size checks should be only done in the outer object; implementations
inside cow_wrapper only assert correctness. All const_cast and as_const
are replaced with correct const method calls (and, where needed, mutable
members).
Change-Id: I69e9f72086d07257ebd5cefaff7f214e198b901e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140106
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
Change-Id: If6bb603cc78863df88d5630b4bd5b1198b4050de
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137148
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
|
|
which is cheaper than copying it when querying from UnoPolyPolygon
Change-Id: If4661dfdff7e277d5ef25a8f0c937e549f8be9f1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137080
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: Ic8dc5b7479c1353487bac883fc0e704356e90798
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136802
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
also remove unneeded typedef
Change-Id: I24fd31ff9da579260f1889ed87065f95dcfd1e23
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134377
Tested-by: Tomaž Vajngerl <quikee@gmail.com>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
|
|
found by tweaking the loplugin:stringview and making it whitelist
getLength
Change-Id: Ic15d3703d1fb07658e99e1db1c89e2fa5bc70c19
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132771
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I6bbf7c6068560e3bb656560fb5c6cc2ed72cecd4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131907
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
|
|
See tdf#42949 for motivation
Change-Id: I42475b8e75951d5dcae2fe6b0ad0bca64441e7f5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126837
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
|
|
And apply some of the results
Change-Id: If555476fdd951cbc1d01fb3ef3ab1cbca2b64960
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124896
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: Ie98606607b2ce262e4eed76bb8cd86fbfe846f76
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125506
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
Change-Id: Ie2b7a1c74fc516781a17a20157b8217bc41e383d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125504
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
spotted by llunak.
No need to take param by &&, since mergeToSinglePol does not
actually need to modify it.
Also flatten it a little.
Change-Id: I2f5ade347db756e21ecb0a88c3935805268f5072
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125086
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
Tested-by: Jenkins
|
|
Change-Id: I73414e94358114ff0d475f13855db8c4c493b6f5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123334
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
See tdf#42949 for motivation
Change-Id: Ifc253bf800bb1468b5774663a93f4fb30bec81d3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113657
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
|
|
Change-Id: I223a00b66f6de75eb06969a6d4582200e8229e2f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104900
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
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>
|
|
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>
|
|
Change-Id: Ideee477b0c8f0d472a607ed69ba51351d87f61bc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101010
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Jenkins
|
|
Change-Id: Iaf9426507e3822363e69dff2cae2b22f34b1b26c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94034
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
|
|
Change-Id: Ief442ff36927b9b14d76d72b25a6cec3d481fb2d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94033
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
|
|
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>
|
|
Change-Id: I486922d0652f26fa7ee56f5fe308e19fe5ff137e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90856
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
Change-Id: If2dee122bf07dc179fd8f6e766442ec1891a5f3d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87845
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
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
|
|
Change-Id: Ied1331d979539ef1183da64c55351b57d24f4a4f
Reviewed-on: https://gerrit.libreoffice.org/85371
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: Ic7b6014e09e3ee1a1b4917008a267b8fa2dbc1f5
Reviewed-on: https://gerrit.libreoffice.org/76814
Tested-by: Jenkins
Reviewed-by: Andrea Gelmini <andrea.gelmini@gelma.net>
|
|
This adds drawing the wave line (typically used to underline the
wrongly spelled words) with bezier curves. Previously the wave
lines were drawn with drawing pixels, which didn't look that good,
especially on HiDPI display, so the looks of wave lines now is
therefor much better.
The creation of the wave line as a polygon has been added to the
basegfx module, so it can be reused if needed.
In addition, everytime we draw the waveline, we have to enable
antialiasing, to have a much better quality of the curves. By
default the antialiasing is disabled for some reason.
This also adds ScopedStates.hxx file which currently includes
ScopedAntialiasing, which sets the antialiasing to a certain state
for the time the object is in scope, and then sets it back to the
original state.
Change-Id: I4b866fc5d69725eb7f6f78a1acf4176b1205aa73
Reviewed-on: https://gerrit.libreoffice.org/74810
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
|
|
This adds a convenience method to B2DPolygon to add a quadratic
bezier segment, which converts its one control point to two
control points of a cubic bezier segment.
The SVG path import is also modified to use this new method
instead of converting inside the importer itself.
Change-Id: I96e9b306066d9ccf2542b17a117db01fa235f405
Reviewed-on: https://gerrit.libreoffice.org/74809
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
|
|
Change-Id: I6297124f6a3ae7bc73d6a29195152e63fa7c78e5
Reviewed-on: https://gerrit.libreoffice.org/74762
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
|
|
.. hori/vert lines only"
This reverts commit f8b4d371eddd27594d549fb00294c01229a9bd24. Tomaz
considers this ugly and it's no longer needed since commit
93abdf39b01bb7b404dc09ef37369a4350fb0d10 (sw lok: assume no windows in
SwLayoutFrame::PaintSwFrame(), 2019-05-14).
Conflicts:
basegfx/test/B2DPolygonTest.cxx
Change-Id: Ia9b29921ff3e5d82085e1abf9f39c172357a5e13
Reviewed-on: https://gerrit.libreoffice.org/72297
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
|
|
For one, it seems this was the intention already since commit
85c70f37b56299f6fa02312c0fb73cc55af084ef (CWS-TOOLING: integrate CWS
aw063, 2009-03-04): "suppress AntiAliasing for pure horizontal or
vertical lines".
For another, this fixes the TileCacheTests::testTileWireIDHandling()
testcase in online.git, which assumes that the indicators at the corners
of the Writer body frame (paragraph marks hidden / default case) can be
painted multiple times, producing pixel-by-pixel matching results. But
in reality AA breaks that assumption, and we know these indicators are
never diagonal lines.
Change-Id: Ib74f823165799991296b64cee58ec106dbdcedcf
Reviewed-on: https://gerrit.libreoffice.org/72000
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
|
|
The old implementation has used 4 segments and a questionable control
point distance. The patch changes this to use the common
implementation in basegfx. The method in basegfx is extended to allow
to set the start quarter, so that the custom shape circle can get the
same start quarter as it has before. The method descriptions in
basegfx are adapted to the current implementation.
Change-Id: I3a40f81827227ee0037d336bdf3c1ec6fdd64b4b
Reviewed-on: https://gerrit.libreoffice.org/63366
Tested-by: Jenkins
Reviewed-by: Regina Henschel <rb.henschel@t-online.de>
|
|
Found with bin/find-unneeded-includes
Only removal proposals are dealt with here.
Change-Id: Ifd59a5d93cfe7dc232891a681002014cd825035a
Reviewed-on: https://gerrit.libreoffice.org/61546
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
|
|
Change-Id: If90ef416e1ed757fede52c33f2e191930be35809
Reviewed-on: https://gerrit.libreoffice.org/60851
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Jenkins
|
|
This change is for speedup of fat line drawing when using
X11. This is a long-term problem which never really progressed,
but is avoided using Cairo in the future. Still - if used,
speedup using current state and buffering possibilities.
Two speedup steps will be used:
(1) The tesselation is no longer done using trapezoids. That
works (but was done wrong leaving artifacts) but is not fast
and done every time. It is even not done with FatLines and
more than 1000 points.
New version will use triangulation. Dspite using the existing
triangulator (that works but is slow) extend the FatLine
geometry creator to directly create triangles.
This is also necessary since for buffering that data a
transformation-invariant version is needed (in device coordinates
the data changes all the time when scrolling). Trapezoids are
by definition *not* transformation-invariant (e.g. rotation)
(2) Buffer that triangulation - with the needed care and watch.
It is e.g. necessary to react on 'hairlines' since these change
their logical LineWidth view-dependent (zoom). In those cases, the
buffered data *has* to be removed due to the base for buffering is
the created FatLine geometry based on one stable logical LineWidth
Also took the time to adapt B2DPolygonTriangulator to use an
own data type (B2DTriangle) and a vector of these for better
understandability and security. Adapted all usages as needed.
Change-Id: Iedb2932b094a8786fd9c32d0d0ab1ca603a1a7b2
Reviewed-on: https://gerrit.libreoffice.org/60818
Tested-by: Jenkins
Reviewed-by: Armin Le Grand <Armin.Le.Grand@cib.de>
|
|
In this step I have changed all calls that use a
B2DPolyPolygon and do filled graphics, added support for
providing needed transformation which will -if supported-
be used. Added buffering of SystemDependentData at
B2DPolyPolygon for that purpose, see comments describing
the current possibilities in the Gdiplus implementation.
Moved lifetime creation/cleanup of SystemDependentDataManager
to ImplSVData due to cleanup problems in the clang build
Tried to use a std::unique_ptr to hold the instance
of a SystemDependentDataBuffer at ImplSVData and cleanup
inside DeInitVCL() right before ::ImplDeInitScheduler. This
works in principle, but scheduler shutdown triggers
ProcessEventsToIdle which leads to repaints and re-creates
the buffer. Will now do exactly as was done with GdiPlusBuffer
before, a simple local static incarnation and a call to
SetStatic() in constructor
Splitted SystemDependentDataBuffer and Timer due to
different LifeTimes. Timer needs to be destructed
earlier than SystemDependentDataBuffer, before
Scheduler::ImplDeInitScheduler() is called from
DeInitVCL()
Change-Id: I2134e4346a183a4cee1be3428c51541cc8867c11
Reviewed-on: https://gerrit.libreoffice.org/60102
Tested-by: Jenkins
Reviewed-by: Armin Le Grand <Armin.Le.Grand@cib.de>
|
|
This is a first step to allow buffering of system
dependent data, especially (but not only) for the
system-dependent implementations of graphic output.
For example, for B2DPolygon and Win output, it allows
buffering the Gdiplus::GraphicsPath instead of re-
creating it all the time.
To support that, the change includes forwarding the
current transformation to the renderers in SalGraphics.
The current state in VCL is to transform all and
everything to device coordinates at every single
paint.
I have currently started to do this for ::drawPolyLine
implementations. The fallbacks for all systems will
at the start of that method just transform the data
to device coordinates, so all works as before.
This may also be done for FilledPolygon paint in a later
step, but most urgent is FatLine painting.
An arrangement of shared_ptr/weak_ptr is used so that
either the instance buffering (in the example B2DPolygon)
or the instance managing it can delete it. The instance
managing it currently uses a 1s Timer and a cycle-lifetime
management, but that can be extended in the future
to e.g. include size hints, too.
The mechanism it designed to support multiple Data per
buffering element, e.g. for B2DPolygon at the same time
system-dependent instances of Gdiplus and Cairo can be
buffered, but also PDF-data.
This is achieved semi-automatic by using
typeid(class).hash_code() as key for organization.
The mechanism will be used for now at B2DPolygon, but
is not limited to. There is already a similar but less
general buffer (see GdiPlusBuffer) that can and will
be converted to use this new mechanism.
Added vcl/headless Cairo renderer to support given
ObjectToDevice transformation (not to transform given
B2DPolygon)
Added support for CairoPath buffered at B2DPolygon,
seems to work well. Need to do more tests
Moved usage to templates suggested by Noel Grandin
(Noel Grandin <noelgrandin@gmail.com>), thanks for
these suggestions. Adapted Win usage to that, too.
Converted Win-specific GdiPlus BitmapBuffer to new
mechanism, works well. Checked, the manager holds
now a mix of bitmap and path data under Win
Added a cleanup mechanism to flush all buffered data
at DeInitVCL() using flushAll() at
SystemDependentDataBuffer
Adapted Linux-versions of ::drawPolyLine to support
PixelSnapHairline, for now in a simplified version
that still allows buffering. This will also be used
(and use buffering) for the Cairo-fallback in
X11SalGraphics
Change-Id: I88d7e438a20b96ddab7707050893bdd590c098c7
Reviewed-on: https://gerrit.libreoffice.org/59555
Tested-by: Armin Le Grand <Armin.Le.Grand@cib.de>
Reviewed-by: Armin Le Grand <Armin.Le.Grand@cib.de>
|
|
Powerpoint only allows M,L,C,Z,E,m,l,c,z,e , i.e. V,H,S ( and
their corresponding relative command ) must not be used and
ending E is mandatory. Command and space delimiters also can not
be skipped.
Change-Id: Icad38ec2eed3e49143eb9a03aa56cc178baae99d
Reviewed-on: https://gerrit.libreoffice.org/58848
Tested-by: Jenkins
Reviewed-by: Mark Hung <marklh9@gmail.com>
|
|
Also make the functions constexpr.
Due to slight changes in floating-point arithmetics (90.0 instead of
180.0, M_PI2 instead of M_PI resp.), results might differ in last
digits (usually 17th decimal digit). This has lead to need to tweak
char2dump's PieChartTest unit test.
Change-Id: I20323dd7dab27e4deb408ea4181e390cc05e7cd3
Reviewed-on: https://gerrit.libreoffice.org/58583
Tested-by: Jenkins
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
Change-Id: I785e96599bbda029adf4698d11d7f981750dec07
Reviewed-on: https://gerrit.libreoffice.org/54802
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I92078fdece135754744d85424956dbb071f3899e
Reviewed-on: https://gerrit.libreoffice.org/53638
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
|
|
Change-Id: Ia58d8950b3b9e48bbe9f075b9fe1eed62d9abf0d
Reviewed-on: https://gerrit.libreoffice.org/53188
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I57e235ecec733f1b5dd03f95f4e022769a369ae2
Reviewed-on: https://gerrit.libreoffice.org/47165
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I2a752025cd429e4d271626402dce5d8a8b0c76d2
Reviewed-on: https://gerrit.libreoffice.org/47021
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
improve the detection of stuff we can return by const &, instead of by
copying
Change-Id: I479ae89d0413125a8295cc3cddbc0017ed61ed69
Reviewed-on: https://gerrit.libreoffice.org/46915
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|