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

Scaling modes of image decorator #54

Closed
mikke89 opened this issue Sep 30, 2019 · 5 comments
Closed

Scaling modes of image decorator #54

mikke89 opened this issue Sep 30, 2019 · 5 comments
Assignees
Labels
enhancement New feature or request

Comments

@mikke89
Copy link
Owner

mikke89 commented Sep 30, 2019

Implement scaling modes for the image decorator, e.g. such as:
image

Also, consider adding a 'fixed-size' center mode for tiled-horizontal, tiled-vertical, and tiled-box decorators.

See discussion in: #22 (comment)

@mikke89 mikke89 self-assigned this Sep 30, 2019
@mikke89 mikke89 added the enhancement New feature or request label Sep 30, 2019
@mikke89
Copy link
Owner Author

mikke89 commented Oct 1, 2019

Have anyone found a good use of the previous tile repeat modes?

I have always been a bit confused about them, and think they can be replaced with the new modes:

enum TileFitMode
{
	FILL,    // Tile is stretched to boundaries.
	CONTAIN, // Tile is stretched to boundaries, keeping aspect ratio fixed, 'letter-boxed'.
	COVER,   // Tile is stretched to cover the boundaries, keeping aspect ratio fixed, and clipped.
	CENTER,  // Tile is centered and never stretched, clipped if too large.
	REPEAT,  // Tile is repeated by tiling if too large, clipped if too small.
};

I'm also trying to stay consistent here with the CSS object-fit naming.

Or maybe it makes more sense with some new keywords for the "center" tiles to say whether they should be fixed (thereby stretching the edges) or stretched (thereby keeping the edges fixed)? And removing the existing repeat modes.

@viciious
Copy link
Contributor

viciious commented Oct 1, 2019

To be honest, I've never used any of those scaling/repeat modes...

mikke89 added a commit that referenced this issue Oct 2, 2019
@viciious
Copy link
Contributor

viciious commented Oct 9, 2019

89bda4a#r35374823

@mikke89
Copy link
Owner Author

mikke89 commented Oct 9, 2019

We now have scaling modes and alignment for the image decorator which I'm quite happy with, see 5ffe4f4.

I'm not sure what makes sense for the other tiled decorators, or how they should be specified.

@mikke89
Copy link
Owner Author

mikke89 commented Feb 28, 2020

I consider this resolved. If anyone have any ideas or use cases for the other tiled decorators, then feel free to open a new issue.

@mikke89 mikke89 closed this as completed Feb 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants