File tree Expand file tree Collapse file tree 1 file changed +4
-7
lines changed
Userland/Libraries/LibGfx Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -26,20 +26,17 @@ class PaintStyle : public RefCounted<PaintStyle> {
26
26
using SamplerFunction = Function<Color(IntPoint)>;
27
27
using PaintFunction = Function<void (SamplerFunction)>;
28
28
29
- friend Painter;
30
- friend AntiAliasingPainter;
31
-
32
- private:
33
- // Simple paint styles can simply override sample_color() if they can easily generate a color from a coordinate.
34
- virtual Color sample_color (IntPoint) const { return Color (); };
35
-
36
29
// Paint styles that have paint time dependent state (e.g. based on the paint size) may find it easier to override paint().
37
30
// If paint() is overridden sample_color() is unused.
38
31
virtual void paint (IntRect physical_bounding_box, PaintFunction paint) const
39
32
{
40
33
(void )physical_bounding_box;
41
34
paint ([this ](IntPoint point) { return sample_color (point); });
42
35
}
36
+
37
+ private:
38
+ // Simple paint styles can simply override sample_color() if they can easily generate a color from a coordinate.
39
+ virtual Color sample_color (IntPoint) const { return Color (); };
43
40
};
44
41
45
42
class SolidColorPaintStyle final : public PaintStyle {
You can’t perform that action at this time.
0 commit comments