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

Implement CSS3 transform #38

Closed
rototor opened this issue Sep 27, 2016 · 7 comments
Closed

Implement CSS3 transform #38

rototor opened this issue Sep 27, 2016 · 7 comments

Comments

@rototor
Copy link
Contributor

rototor commented Sep 27, 2016

I've started implementing CSS3 transform. My primary goal is to get rotate() working. The rest should be relative easy, but I primary need rotate(90deg).

You can view the my current development here https://github.com/rototor/openhtmltopdf/tree/css3-transform-implementation

CSS parsing should be mostly done, but it is not yet applied on the elements. I'll be away for a week on holidays, but will continue to implement this afterwards.

Note, related to #23 I implemented saveSate() and restoreState() - also for Java2D.

@danfickle
Copy link
Owner

@rototor - Looks good. The hard part is implementing transform origin I think (from memory).

@danfickle
Copy link
Owner

@rototor - Would you mind submitting a pull request with what you have got and I'll see if I can help with implementation?

Thanks,
Daniel.

P.S I hope you had a wonderful holiday!

@rototor
Copy link
Contributor Author

rototor commented Oct 30, 2016

@danfickle I sent you a pull request #45. Sorry for the delay, after holiday the usual "we need that and that now" happened in work... had no time yet to look future into this...

@danfickle
Copy link
Owner

Thanks mate, I'll see how far I get.

danfickle added a commit that referenced this issue Nov 12, 2016
…sform. [ci skip]

Next step is to create a list of AffineTransform objects in the
property builder for transform.
@danfickle
Copy link
Owner

OK, initial support has landed.

What is not supported yet:

  • Multiple transforms on the one element.
  • Transformed element across pages.
  • translate, translateX, translateY, skew, skewX and skewY

What is supported:

  • rotate, matrix, scale, scaleX, scaleY
  • Transforms on nested elements.
  • transform-origin.
  • Transforms on the second and subsequent page.

I'll do a release tomorrow so everyone can test it out.

@danfickle
Copy link
Owner

I thought about this some more, the problem with cross-page transforms is that the page(s) to paint text and other content on is determined by the pre-transform coordinates. We need to use the post transform coordinates.

@danfickle
Copy link
Owner

All working now.

burka pushed a commit to burka/openhtmltopdf that referenced this issue May 3, 2024
danfickle#38)

Don't publish Maven artifacts for modules that were not published earlier on.

There's config in these modules to make them skip Maven deploy, but the new Maven publishing plugin doesn't care about that config, so using the new exclude artifacts mechanism
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants