Commit Graph

26 Commits

Author SHA1 Message Date
Jeff Young b4492e0bd2 More EDA_RECE yeetage. 2022-08-31 17:19:50 +01:00
Jeff Young 2dc6300501 Move EDA_ITEM bounding boxes to BOX2I. 2022-08-31 10:16:55 +01:00
jean-pierre charras d0d19423e0 Eeschema: Try to fix bitmap printing in wx version > 3.1.5
We had on a regular basis problems when printing bitmaps.
Probably due to issues in wx and in our code.
2022-08-04 14:25:52 +02:00
Jeff Young 6f49b57f9b Cleanup & performance enhancements. 2022-08-01 13:09:51 +01:00
jean-pierre charras 905df71977 Fix an issue when printing bitmaps when not on wxWidgets 3.1.6 and 3.1.7
Commit 6e35d5473 added a hack to fix an issue on wxWidgets 3.1.6. But this hack
must by applied to 3.1.6 and 3.1.7, not to other versions.
Modify commit 048cf6df that applied the fix to 3.1.6 only
2022-07-29 13:09:20 +02:00
jean-pierre charras 048cf6df7a Fix an issue when printing bitmaps when not on wxWidgets 3.1.6
Commit 6e35d5473 added a hack to fix an issue on wxWidgets 3.1.6. But this hack
must by applied only to 3.1.6, not to other versions.
Fixes #12108
https://gitlab.com/kicad/code/kicad/issues/12108
2022-07-29 10:26:45 +02:00
jean-pierre charras 6e35d5473e Fix an issue on wxWidgets 3.1.6 when printing bitmaps 2022-04-08 18:40:25 +02:00
jean-pierre charras b084115a9e BITMAP_BASE::DrawBitmap(): fix position of the clipping area when using matrix transform.
Fixes #10525
https://gitlab.com/kicad/code/kicad/issues/10525
2022-01-20 16:15:39 +01:00
jean-pierre charras 563e8817a2 Fix a compil issue. 2022-01-08 08:10:18 +01:00
Seth Hillbrand c72593ca01 Printing multiple bitmaps
A long-standing issue with multiple workarounds
(https://gitlab.com/kicad/code/kicad/-/issues/1877) prevented eeschema
printouts with multiple images or images in both the worksheet and the
schematic.

We worked around this by ordering the bitmap printing to be the first
step in the printing process.  This partially worked but didn't get
everything correct.  The primary difficulty in debugging this was that
the wxPrintPreview that we generate looked correct.  Only the actual
printout was incorrect.

The fix is to explicitly clip bitmap drawing to the bitmap area,
regardless of how large the bitmap is.

(cherry picked from commit 69469b254a)
2022-01-07 17:22:16 -08:00
Marek Roszko c4c56de708 Neurotically update position wxPoint usages 2022-01-01 11:55:51 -05:00
Wayne Stambaugh 46b959c3e3 Move plotter headers into include folder. 2021-08-18 16:38:31 -04:00
Wayne Stambaugh 89b1fdabe9 Pass COLOR4D object by reference instead of on the stack. 2021-07-26 13:28:56 -04:00
Wayne Stambaugh bcd6bddfd4 Start expunging NULL.
Given that KiCad is a C++ project, we should really be using nullptr
instead of NULL.
2021-07-15 15:44:45 -04:00
Dominik Wernberger e2aa7be4b3 Added a lot of consts and refactored a few lines 2021-03-08 12:49:48 -08:00
jean-pierre charras 005c3b84ad Better fix for incorrect page preview in Page Settings when the worksheet contains a bitmap
The actual size of pixels was incorrectly set.
Fix also bad names for a few vars and methods in BITMAP_BASE.
2020-11-28 10:53:26 +01:00
jean-pierre charras 077611b8f1 BITMAP_BASE, Eeschema: fix incorrect position of the bitmap when printing.
The previous calculation was not compatible with aDC->SetTransformMatrix()
used in PrintPage in Eeschema.
2020-05-25 07:51:46 +02:00
Seth Hillbrand 4ebb87d1c1 Fix Eeschema BW printing
Checks forced state when printing to convert images to grayscale.
2020-01-11 09:55:30 -08:00
Seth Hillbrand 195c3d074b Fix bitmap clipping
When printing (using DC context) the bitmap will clear the full screen
unless the clipping region is set to the image itself.

Addresses KSC ticket 126

Fixes #1877 | https://gitlab.com/kicad/code/kicad/issues/1877
2020-01-11 09:47:19 -08:00
Seth Hillbrand a35db35029 eeschema: Fix bitmap scaling when printing
Bitmaps scale internally to 100nm instead of 1mil.  There is a better
way to do this but I think we'll be adjusting it again when Cairo
printing in finished.
2020-01-10 16:33:53 -08:00
Ian McInerney 13b6028e1b Refactor all math into a new kimath library
* Split up the thirdparty code into the thirdparty folder (#3637)
* Create a new kimath static library containing all the math functions

This is part of cleaning the build system for #1906.
2020-01-07 17:12:59 +00:00
John Beard 2dd5757eb5 Common: Fix copy-construction of empty BITMAP_BASE
The bitmap pointer is not checked at copy construct. This is
an instant segfault if you copy an empty bitmap.

Fix the constructor and remove the expected test failure, from the
previous commit.
2019-05-23 16:58:08 +01:00
John Beard 94b46ce176 QA common: add some BITMAP_BASE tests
Also:

* Init wx image handlers for qa_common
* Break out COLOR4D test predicates
* Fix some bitmap_base.h headers/forwards
2019-05-23 15:19:51 +01:00
Tomasz Wlostowski 0d720fdeff eeschema-gal: factor out EDA_DRAW_PANEL from BITMAP_BASE, remove some unnecessary includes of class_drawpanel.h 2018-10-09 11:08:52 +01:00
jean-pierre charras d44494beda Update code after file renaming 2018-01-29 09:39:49 +01:00
jean-pierre charras fa10e1b7fe rename a few files 2018-01-29 09:39:47 +01:00
Renamed from common/class_bitmap_base.cpp (Browse further)