#
4399ec51 |
|
10-Jun-2020 |
X512 <danger_mail@list.ru> |
BPicture: add fill rule support Change-Id: I068e1c2e8659f7b90c6d7c7331a8bb25ae343fe9 Reviewed-on: https://review.haiku-os.org/c/haiku/+/2922 Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
|
#
90ab1a44 |
|
27-May-2020 |
X512 <danger_mail@list.ru> |
BPicture: add gradient support Fixes #9680. Change-Id: I0013326559cc40ff26cf7b44794c0b32aea832ba Reviewed-on: https://review.haiku-os.org/c/haiku/+/2829 Reviewed-by: Stephan Aßmus <superstippi@gmx.de>
|
#
954a0a0c |
|
02-Jan-2019 |
Stephan Aßmus <superstippi@gmx.de> |
Fix some cases of updating draw state while recording a BPicture * Also implemented recording DrawString(string, length, BPoint[] locations), which was previously not recorded at all. * Also implemented playing back recently added drawing commands in PicturePlayer.cpp. I don't quite understand what this is actually used for, but it seemed it was forgotten. I just followed the pattern already established in the code. * The other important bit in this change is to update the pen location when it is needed while recording a BPicture. Often the BView will use PenLocation() in order to transmit drawing commands to the app_server which use absolute coordinates only. This isn't actually so nice, since it means the client has to wait for the server to transmit the current pen location. If there were dedicated link-commands for pen-relative drawing commands, the client could just keep sending without waiting for the server. In any case, the app_server needs to update the pen location in the current DrawState and even the DrawingEngine even while recording a picture, because some next command may need up-2-date state information, such as the font state and the pen location. * I have not yet tried to find /all/ instances where the DrawState needs to be updated while recording. This change should repair /all/ font state changes, all versions of drawing a string, and all versions of StrokeLine(). Change-Id: Ia0f23e7b1cd058f70f76a5849acb2d02e0f0da09 Reviewed-on: https://review.haiku-os.org/c/817 Reviewed-by: Stephan Aßmus <superstippi@gmx.de>
|
#
25dbf74b |
|
10-Nov-2015 |
Julian Harnath <julian.harnath@rwth-aachen.de> |
BView: add methods for affine translation/scaling/rotation * BView::TranslateBy(), BView::ScaleBy() and BView::RotateBy() allow to conveniently modify the current affine transformation. This makes it unnecessary to first read the current transform, modify it, and then set it again. Uses the new Pre...() methods of BAffineTransform. * Also, remove setting the transform "through" to the BView even while recording a BPicture, as this now results in transforms being applied more than once.
|
#
4bd6f322 |
|
09-Nov-2015 |
Julian Harnath <julian.harnath@rwth-aachen.de> |
app_server/Interface Kit: add new clipping API * Add new clipping API for rectangles (ClipToRect, ClipToInverseRect) and shapes (ClipToShape, ClipToInverseShape) * Works with affine transforms and automatically switches from fast region-based clipping to alpha-mask based clipping as necessary. * Always self-intersecting, i.e. no state push required to further narrow down the clipping region. All of the 4 new methods can be mixed in any order.
|
#
ce27f961 |
|
05-Sep-2015 |
Stefano Ceccherini <stefano.ceccherini@gmail.com> |
Implement ClipToPicture inside a BPicture. Not working yet. BView::ClipToPicture doesn't work anymore, when nested inside a BPicture, This happened when its implementation was moved server-side.
|
#
eec73693 |
|
05-Sep-2015 |
Michael Lotz <mmlr@mlotz.ch> |
PicturePlayer: Rework to be more safe against corrupted data. This introduces a more sane API (currently private) that allows for safer and possibly more efficient implementations: * It uses a struct of named and typed function pointers instead of just a void pointer array. This adds type safety to the callbacks so the compiler can figure out if things match up before subtle bugs get introduced. * It provides bounds for all strings/buffers passed to the callbacks. * It uses const references instead of implicitly copying arguments. * It folds stroke_x/fill_x pairs into draw_x functions with a fill argument to reduce the amount of functions needed. * It uses unsigned values where negative values make no sense. The old API has been implemented on top of the new one using adapter functions. It makes copies of all data passed to the callbacks which effectively keeps the picture data from being modified. This matches with the R5 behaviour. This also reimplements the buffer parsing to be safe against corrupted data by validating that the types actually fit in the provided sizes and buffers (using a templated reader). Since this class is used from the app_server with user provided data, making it more safe is important even though it comes with a slight overhead (replicating R5 behaviour, i.e. crashing the app_server when corrupted data is fed, doesn't seem very appropriate here).
|
#
f6e4cbb9 |
|
15-Oct-2007 |
Axel Dörfler <axeld@pinc-software.de> |
* Rewrote BeBuild.h which had "a few" consequences (got rid of all those class definitions). * Minor cleanup here and there. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22577 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
422fadc8 |
|
16-Aug-2007 |
Stefano Ceccherini <stefano.ceccherini@gmail.com> |
Moved the dummy table local to the PicturePlayer::Play() function since, as Marcus pointed out, having it outside wasn't thread safe. Moved PicturePlayer into the BPrivate namespace. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21982 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
0b0ecfab |
|
01-Mar-2007 |
Marcus Overhagen <marcusoverhagen@gmail.com> |
Added "const" to many parameters. Removed most data allocations/copying from PicturePlayer, ServerPicture now has to do this when converting coordinates. Added additional functions to ViewLayer to copy&convert multiple BPoint, BRect, BRegion to Screen coordinates, those should be further optimized. Removed some function call overhead. Note: some functions of PicturePlayer don't appear to be implented by PictureDataWriter, git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20292 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
a20cecff |
|
01-Mar-2007 |
Marcus Overhagen <marcusoverhagen@gmail.com> |
removed unnecessary use of const_cast<> and (global) do_playback() function git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20290 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
94acebc5 |
|
12-Nov-2006 |
Jérôme Duval <korli@users.berlios.de> |
fix the build git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19267 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
ab757c7a |
|
09-Nov-2006 |
Stefano Ceccherini <stefano.ceccherini@gmail.com> |
our BPicture stream format wasn't compatible with R5 one. Hopefully fixed all the problems. Reported by Marc Flerackers. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19241 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
e372c1ba |
|
23-Oct-2006 |
Stefano Ceccherini <stefano.ceccherini@gmail.com> |
renaming... git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19098 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
ce27f9612e78bbb58c62bdc54c02bfc0e5172681 |
|
05-Sep-2015 |
Stefano Ceccherini <stefano.ceccherini@gmail.com> |
Implement ClipToPicture inside a BPicture. Not working yet. BView::ClipToPicture doesn't work anymore, when nested inside a BPicture, This happened when its implementation was moved server-side.
|
#
eec73693e030e7455f2312ab49613b1b85076c73 |
|
05-Sep-2015 |
Michael Lotz <mmlr@mlotz.ch> |
PicturePlayer: Rework to be more safe against corrupted data. This introduces a more sane API (currently private) that allows for safer and possibly more efficient implementations: * It uses a struct of named and typed function pointers instead of just a void pointer array. This adds type safety to the callbacks so the compiler can figure out if things match up before subtle bugs get introduced. * It provides bounds for all strings/buffers passed to the callbacks. * It uses const references instead of implicitly copying arguments. * It folds stroke_x/fill_x pairs into draw_x functions with a fill argument to reduce the amount of functions needed. * It uses unsigned values where negative values make no sense. The old API has been implemented on top of the new one using adapter functions. It makes copies of all data passed to the callbacks which effectively keeps the picture data from being modified. This matches with the R5 behaviour. This also reimplements the buffer parsing to be safe against corrupted data by validating that the types actually fit in the provided sizes and buffers (using a templated reader). Since this class is used from the app_server with user provided data, making it more safe is important even though it comes with a slight overhead (replicating R5 behaviour, i.e. crashing the app_server when corrupted data is fed, doesn't seem very appropriate here).
|
#
f6e4cbb95290a74b33d012600438b84742b0e572 |
|
15-Oct-2007 |
Axel Dörfler <axeld@pinc-software.de> |
* Rewrote BeBuild.h which had "a few" consequences (got rid of all those class definitions). * Minor cleanup here and there. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22577 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
422fadc829581055c4776614f7cffce670e51ab6 |
|
16-Aug-2007 |
Stefano Ceccherini <stefano.ceccherini@gmail.com> |
Moved the dummy table local to the PicturePlayer::Play() function since, as Marcus pointed out, having it outside wasn't thread safe. Moved PicturePlayer into the BPrivate namespace. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21982 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
0b0ecfab9004dab03fc2cdc6b0d1bc01fd4336af |
|
01-Mar-2007 |
Marcus Overhagen <marcusoverhagen@gmail.com> |
Added "const" to many parameters. Removed most data allocations/copying from PicturePlayer, ServerPicture now has to do this when converting coordinates. Added additional functions to ViewLayer to copy&convert multiple BPoint, BRect, BRegion to Screen coordinates, those should be further optimized. Removed some function call overhead. Note: some functions of PicturePlayer don't appear to be implented by PictureDataWriter, git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20292 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
a20cecff6093c665b08dca997b34c82fb168a733 |
|
01-Mar-2007 |
Marcus Overhagen <marcusoverhagen@gmail.com> |
removed unnecessary use of const_cast<> and (global) do_playback() function git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20290 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
94acebc5d2d9646724d4ef3f602c3982e00f83ed |
|
12-Nov-2006 |
Jérôme Duval <korli@users.berlios.de> |
fix the build git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19267 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
ab757c7a3ad45bf6112c913a3fec935bb58899dd |
|
09-Nov-2006 |
Stefano Ceccherini <stefano.ceccherini@gmail.com> |
our BPicture stream format wasn't compatible with R5 one. Hopefully fixed all the problems. Reported by Marc Flerackers. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19241 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
e372c1ba81e3fa4bec62eb4c89f00d77de613a63 |
|
23-Oct-2006 |
Stefano Ceccherini <stefano.ceccherini@gmail.com> |
renaming... git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19098 a95241bf-73f2-0310-859d-f6bbb57e9c96
|