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

Render poster from a given template #2

Open
hellozee opened this issue Jun 9, 2018 · 4 comments
Open

Render poster from a given template #2

hellozee opened this issue Jun 9, 2018 · 4 comments
Labels
summer-projects views needed Asks users to voice their views

Comments

@hellozee
Copy link
Member

hellozee commented Jun 9, 2018

Currently splatter draws according to a predefined set of hard coded constraints, using templates would able it to create posters with variations.
People could write templates using simple XML, then the simple XML could be compiled into a more complex one which would have things like embedded image files, calculated the constraints for the features.

@hellozee hellozee added the views needed Asks users to voice their views label Jun 11, 2018
@Boot-Error
Copy link

I want to take up this task

My Idea

Use yaml format to design the template, with the semantics similar to css.
Define some elements such as a TextBox, imageBox, and one can write a theme from these primitive elements.
Initially, the theme engine parses the YAML file, determines the elements to be painted. Then the layout is calculated, such as overall surface, position of elements on the canvas which then will be supplied to the painter which only has code related to painting based on the results from the layout.

I ll start working on theme branch.

@hellozee
Copy link
Member Author

hellozee commented Jun 11, 2018

Nice, I have never worked with yaml though, can we embed images into the yaml?
Also we have some other important issues to be addressed before starting the theme engine.

@Boot-Error
Copy link

Boot-Error commented Jun 11, 2018

Um, its more like JSON, I think sticking to JSON files for theme works too, just like sublime themes.

its ok, theme engine can live as a seperate package.

@hellozee
Copy link
Member Author

Since there are 2 different files involved and one is already json, making the other file in json would confuse people.
Though the way I perceive it is, a person writes the theme in a standard format like yaml, our theme engine calculates and generates a .splat file which will be just an xml but with calculations already done and images embedded into the xml, so that that .splat file is now portable and can be used anywhere.
Then anyone could generate poster with that .splat and their own config.json

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
summer-projects views needed Asks users to voice their views
Projects
None yet
Development

No branches or pull requests

2 participants