[librsvg/hospitality] ARCHITECTURE.md: element attributes; start of the Rendering section
- From: Federico Mena Quintero <federico src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg/hospitality] ARCHITECTURE.md: element attributes; start of the Rendering section
- Date: Sat, 6 Jan 2018 01:32:21 +0000 (UTC)
commit 4c612f42c28fb4de5e74feee01db7aa573fee038
Author: Federico Mena Quintero <federico gnome org>
Date: Fri Jan 5 18:15:37 2018 -0600
ARCHITECTURE.md: element attributes; start of the Rendering section
ARCHITECTURE.md | 30 ++++++++++++++++++++++++++++++
1 file changed, 30 insertions(+)
---
diff --git a/ARCHITECTURE.md b/ARCHITECTURE.md
index 8f4167a..720ef06 100644
--- a/ARCHITECTURE.md
+++ b/ARCHITECTURE.md
@@ -82,3 +82,33 @@ that is "in error". However, most implementations simply seem to
ignore erroneous elements instead of completely stopping rendering,
and we do the same in librsvg.
+## Element attributes and specified/computed values
+
+Some HTML or SVG engines like Gecko / Servo make a very clear
+distinction between "specified values" and "computed values" for
+element attributes. Currently librsvg doesn't have a clear
+distinction.
+
+Unspecified attributes cause librsvg to use defaults, some as per the
+spec, and some (erroneously) as values that seemed to make sense at
+the time of implementation. Please help us find these and make them
+spec-compliant!
+
+For specified attributes, sometimes the set_atts() methods will
+validate the values and resolve them to their final computed form, and
+sometimes they will just store them as they come in the SVG data. The
+computed or actually used values will be generated at rendering time.
+
+# Rendering
+
+The public `rsvg_handle_render_cairo()` and `rsvg_handle_cairo_sub()`
+functions initiate a rendering process; the first function just calls
+the second one with the root element of the SVG.
+
+This second function creates `RsvgDrawingCtx`, which contains the
+rendering state. This structure gets passed around into all the
+rendering functions. It carries the vtable for rendering in the
+`render` field, the CSS state for the node being rendered in the
+`state` field, and other values which are changed as rendering
+progresses.
+
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]