Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace paint/filter properties with equivalent getters #2

Open
naomai opened this issue Jul 4, 2024 · 0 comments
Open

Replace paint/filter properties with equivalent getters #2

naomai opened this issue Jul 4, 2024 · 0 comments

Comments

@naomai
Copy link
Owner

naomai commented Jul 4, 2024

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]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant