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

Extract WPF-dependent code into a separate project #63

Closed
gsomix opened this issue Feb 26, 2017 · 11 comments
Closed

Extract WPF-dependent code into a separate project #63

gsomix opened this issue Feb 26, 2017 · 11 comments
Assignees

Comments

@gsomix
Copy link
Collaborator

gsomix commented Feb 26, 2017

As part of #18 and #17.

@gsomix gsomix self-assigned this Feb 26, 2017
@alexreg
Copy link
Collaborator

alexreg commented Feb 26, 2017

Yep. An abstract rendering API might take a bit more thought than simply refactoring, but I am all for this!

@ForNeVeR
Copy link
Owner

I thought we could use visitor pattern to abstract this. We already have very similar code in Draw and RenderGrometry methods; that could be a basis for that refactoring. After extracting these to separate visitors, we could probably just split WPF part and the parser.

The parser still use some WPF features (I think fonts), so we should abstract those, also.

@gsomix
Copy link
Collaborator Author

gsomix commented Dec 6, 2017

OK, this is next huge step after #93 got merged.

@ForNeVeR
Copy link
Owner

ForNeVeR commented Dec 6, 2017

We'll definitely need to discuss that. Now I have a bit of insight on how our code works, so I could probably provide a useful advice.

@ForNeVeR ForNeVeR mentioned this issue Jan 13, 2019
14 tasks
@rstm-sf
Copy link
Contributor

rstm-sf commented Jan 11, 2020

@ForNeVeR, hello!

Do you update the 17-avalonia branch yourself? Or can I make edits to this thread without updates?

P.S. I have no goals yet. I'm just eyeing :)

@ForNeVeR
Copy link
Owner

I would accept a pull request to that branch.

@rstm-sf
Copy link
Contributor

rstm-sf commented Feb 24, 2020

Can we replace bg / fg Brush with RgbaColor (maybe also new struct with color and opacity) and only create a Brush when rendering?
https://github.com/ForNeVeR/wpf-math/search?p=1&q=brush&unscoped_q=brush

@ForNeVeR
Copy link
Owner

Yeah, this seems like a right course of action. We'll lose some flexibility though (e.g. it won't be possible to create a texture background and such).

Could you think of a better solution, which will preserve ability to pass arbitrary Brush (or whatever is Avalonia equivalent called) as a fore/background for our atoms?

@rstm-sf
Copy link
Contributor

rstm-sf commented Feb 29, 2020

It seems that we only need to know the color information:

@ForNeVeR
Copy link
Owner

ForNeVeR commented Mar 2, 2020

Yes, I'm not talking about defining texture backgrounds from LaTeX code. I'm talking about providing an externally-defined Brush for background/foreground, which may actually be useful.

@ForNeVeR ForNeVeR self-assigned this Dec 30, 2022
ForNeVeR added a commit that referenced this issue Jan 10, 2023
ForNeVeR added a commit that referenced this issue Jan 10, 2023
There weren't any colors in the predefined formula arguments anyway.
ForNeVeR added a commit that referenced this issue Jan 15, 2023
ForNeVeR added a commit that referenced this issue Jan 25, 2023
Custom IElementRenderers may use it.
ForNeVeR added a commit that referenced this issue Jan 25, 2023
Custom IElementRenderers may use it.
ForNeVeR added a commit that referenced this issue Jan 25, 2023
Clarify docs, change type visibility, fix namespaces, connect TODOs with
the issues.
ForNeVeR added a commit that referenced this issue Jan 25, 2023
Clarify docs, change type visibility, fix namespaces, connect TODOs with
the issues.
ForNeVeR added a commit that referenced this issue Jan 25, 2023
Clarify docs, change type visibility, fix namespaces, connect TODOs with
the issues.
@ForNeVeR
Copy link
Owner

Closed by #327.

There are now some basic abstractions for:

  • colors,
  • brushes,
  • fonts,
  • geometry.

Some of those were taken from the Avalonia branch, and ultimately everything is done with it in mind.

This has unlocked us from further work on #17.

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

4 participants