Layer::$paint and Layer::$filter should be exposed through getters, in style of select() and reorder().
$layer->paint()->text(101, 9, "clutter", ['color'=>0x000000]);
$layer->reorder()->putAt(1);
$layer->select(50, 50, 100, 50)->moveOffset(10, 0)->apply();
In case of layers imported from external source, painting operations might be performed outside of original dimensions (Layer Surface). This requires invalidating the Layer Surface dimensions. The implementation would be possible in such getter.
The similar implementation would also be needed for Selection - replace __get.
Currently, the painting/filter functions are accessible from Layer through directly-exposed properties.
$layer->paint->text(101, 9, "clutter", ['color'=>0x000000]);
Layer::$paintandLayer::$filtershould be exposed through getters, in style ofselect()andreorder().In case of layers imported from external source, painting operations might be performed outside of original dimensions (Layer Surface). This requires invalidating the Layer Surface dimensions. The implementation would be possible in such getter.
The similar implementation would also be needed for
Selection- replace__get.Currently, the painting/filter functions are accessible from
Layerthrough directly-exposed properties.