- some fixes in the Legacy(2D) graphic mode regarding the possibility of changing the color of the Gerber objects

- added a method to darken the outline color for Gerber objects when they have the color set
- when Printing as PDF Gerber objects now the rendered color is the print color
This commit is contained in:
Marius Stanciu
2019-12-23 02:30:56 +02:00
committed by Marius
parent 5b62b3c5f6
commit 98d5986190
5 changed files with 55 additions and 10 deletions

View File

@@ -656,8 +656,8 @@ class FlatCAMGUI(QtWidgets.QMainWindow):
self.menuproject_green = self.menuprojectcolor.addAction(
QtGui.QIcon(self.app.resource_location + '/green32.png'), _('Green'))
self.menuproject_violet = self.menuprojectcolor.addAction(
QtGui.QIcon(self.app.resource_location + '/violet32.png'), _('Violet'))
self.menuproject_purple = self.menuprojectcolor.addAction(
QtGui.QIcon(self.app.resource_location + '/violet32.png'), _('Purple'))
self.menuproject_brown = self.menuprojectcolor.addAction(
QtGui.QIcon(self.app.resource_location + '/brown32.png'), _('Brown'))

View File

@@ -957,9 +957,17 @@ class ShapeCollectionLegacy:
:param linewidth: the width of the line
:return:
"""
self._color = color[:-2] if color is not None else None
self._face_color = face_color[:-2] if face_color is not None else None
self._alpha = int(face_color[-2:], 16) / 255 if face_color is not None else 0.75
self._color = color if color is not None else "#006E20"
self._face_color = face_color if face_color is not None else "#BBF268"
if len(self._color) > 7:
self._color = self._color[:7]
if len(self._face_color) > 7:
self._face_color = self._face_color[:7]
# self._alpha = int(self._face_color[-2:], 16) / 255
self._alpha = 0.75
if alpha is not None:
self._alpha = alpha