Comments (2)
Short answer: Yes, Cairo supports OpenGL as a backend.
Long answer: A rendering subsystem which uses OpenGL directly could be written but you'd essentially have to rewrite a 2D drawing library like Direct2D or Cairo over the top of it, which is something that I don't think many people would want to do.
As for your points, I'm not sure what you're asking in the first two.
For point 3 - There is no single base class, as there are many facets to the rendering subsystem. The easiest way to see what needs to be implemented currently is to look at the code:
https://github.com/grokys/Perspex/tree/master/Windows/Perspex.Direct2D1
https://github.com/grokys/Perspex/tree/master/Cairo/Perspex.Cairo
But in short:
- The main interface is IPlatformRenderInterface which is implemented by Direct2D1Platform and CairoPlatform.
- You need to implement an IRenderer to actually carry out the drawing. The Direct2D and Cairo versions of this are actually sufficiently similar that a common base-class should probably factored out.
- You then need to implement the platform-specific impls of the various media classes such as DrawingContent, FormattedText, Geometries etc.
This can probably be tidied up to some extent and certainly needs to be documented better.
from avalonia.
This is related to #6
from avalonia.
Related Issues (20)
- The modal dialog flashes on macOS when clicking on the parent window HOT 2
- Avalonia menu export DBus interop crashes plasma 5.27 HOT 1
- OptionalFeatureProvider in Linux Framebuffer platform HOT 4
- The TextBox input using the PasswordChar property has incorrect behavior on Android HOT 9
- Cannot add datagrid control HOT 22
- Textblock shows nothing with timespan string format HOT 1
- Update Popup.OverlayDismissEventPassThrough default based on form factor
- ILauncher launch events and intercept
- [Linux] Better integration with the desktop environment HOT 1
- 11.1.0 regression: FontFamily="Monospace" doesn't do anything
- The INotifyDataErrorInfo validates the data and vertically arranges the prompt content on the interface. HOT 5
- Consider reviewing IAvaloniaList.TrackItemPropertyChanged-extension
- Custom font family is not working in WebAssembly HOT 2
- Converters for resources HOT 2
- MenuFlyout ItemsSource item binding command always disabled HOT 1
- AVLN3000: Can't use resource for Foreground property of TextPresenter HOT 1
- Arabic diacritics rendered incorrectly
- Visibility of Text selection handles on empty TextBoxes on Android HOT 1
- Soft Keyboard Reappearance Issue for an already focused TextBox HOT 1
- PointerMovedEvent and PointerReleasedEvent do not trigger after mouse leaves the title bar with pressed HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from avalonia.