mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-24 10:12:25 -05:00
1d47d41c01
The problem was a bit more complex than originally anticipated, and the root of the problem is that the "coordinates" of a pixel are actually the top left of the pixel, and when we're really zoomed in, the difference in editor coordinates of the top-left and the center of the pixel is significant. So, we need to offset the "start" point when we are painting on the editor to account for this, based on the current scale. This patch adds a `editor_stroke_position` in `Tool` which can be used to compute what point (in editor coords) we should use for a given pixel and it's corresponding stroke thickness. Note that this doesn't really work well with the ellipse, since that is drawn with a different mechanism. Using this new method with the `EllipseTool` seems to give the same (or slightly worse) results, so I have not changed anything there for now. |
||
---|---|---|
.. | ||
BrushTool.cpp | ||
BrushTool.h | ||
BucketTool.cpp | ||
BucketTool.h | ||
CMakeLists.txt | ||
CreateNewImageDialog.cpp | ||
CreateNewImageDialog.h | ||
CreateNewLayerDialog.cpp | ||
CreateNewLayerDialog.h | ||
EditGuideDialog.cpp | ||
EditGuideDialog.gml | ||
EditGuideDialog.h | ||
EllipseTool.cpp | ||
EllipseTool.h | ||
EraseTool.cpp | ||
EraseTool.h | ||
FilterParams.h | ||
Guide.h | ||
GuideTool.cpp | ||
GuideTool.h | ||
Image.cpp | ||
Image.h | ||
ImageEditor.cpp | ||
ImageEditor.h | ||
Layer.cpp | ||
Layer.h | ||
LayerListWidget.cpp | ||
LayerListWidget.h | ||
LayerPropertiesWidget.cpp | ||
LayerPropertiesWidget.h | ||
LineTool.cpp | ||
LineTool.h | ||
main.cpp | ||
MainWidget.cpp | ||
MainWidget.h | ||
Mask.cpp | ||
Mask.h | ||
MoveTool.cpp | ||
MoveTool.h | ||
PaletteWidget.cpp | ||
PaletteWidget.h | ||
PenTool.cpp | ||
PenTool.h | ||
PickerTool.cpp | ||
PickerTool.h | ||
PixelPaintWindow.gml | ||
ProjectLoader.cpp | ||
ProjectLoader.h | ||
RectangleSelectTool.cpp | ||
RectangleSelectTool.h | ||
RectangleTool.cpp | ||
RectangleTool.h | ||
Selection.cpp | ||
Selection.h | ||
SprayTool.cpp | ||
SprayTool.h | ||
Tool.cpp | ||
Tool.h | ||
ToolboxWidget.cpp | ||
ToolboxWidget.h | ||
ToolPropertiesWidget.cpp | ||
ToolPropertiesWidget.h | ||
ZoomTool.cpp | ||
ZoomTool.h |