pub struct View {Show 25 fields
pub target: Target,
pub window: Option<Window>,
pub portion: Option<[f64; 2]>,
pub size_px: [f64; 2],
pub background: String,
pub hidden: Vec<String>,
pub colours: Vec<(String, String)>,
pub unit_colours: Vec<(String, String)>,
pub widths: Vec<(String, f64)>,
pub well_colouring: WellColouring,
pub well_width_px: f64,
pub fills: Vec<FillChoice>,
pub show: Show,
pub axis: AxisMode,
pub highlight: Vec<String>,
pub labels: LabelMode,
pub paints: Vec<(String, Paint)>,
pub joints: Joint,
pub zoom_script: bool,
pub strata_legend: bool,
pub strata_ticks: bool,
pub draw_unstratified: bool,
pub unstratified: UnstratifiedStyle,
pub store_names: Vec<(String, String)>,
pub markers: Vec<Marker>,
}Expand description
What to draw and how - nothing here makes a new catalogue.
Fields§
§target: TargetA section, or the plan.
window: Option<Window>The window drawn; None: everything, with a margin.
portion: Option<[f64; 2]>A portion of the trace: [s start, s end], a truncation - the
abscissas keep their origin at the trace’s first point.
size_px: [f64; 2]The drawing’s size in pixels.
background: StringThe background colour.
Objects hidden in this drawing, by key.
colours: Vec<(String, String)>Colours the scene gives objects, by key - the front end’s colour stack, resolved by the front end (never a second resolution here).
unit_colours: Vec<(String, String)>The colour of each stratigraphic unit now, by the key of its well’s
package and the unit’s full uri (object_key of store and
Interval::unit_uri), resolved by the library’s colour walks. Read
before the colour baked into an interval, by the wells and by the
strata legend, so that the two cannot disagree - and a colour edited
after the catalogue was made shows without making a new one. Empty: the
baked colours, as drawings always were (and then not written into
the metadata).
widths: Vec<(String, f64)>Line widths in pixels, by object key: each overrides, for that object
only, the default width (well_width_px for a well). A width that is
not a finite number in (0, MAX_WIDTH_PX] is refused by name in the
drawing’s warnings and the default is drawn.
well_colouring: WellColouringHow wells are coloured.
well_width_px: f64How wide a well is drawn, in pixels.
fills: Vec<FillChoice>For each surface, which way its colour fills.
show: ShowWhat is shown.
axis: AxisModeWhat the horizontal axis says.
highlight: Vec<String>Objects put forward on purpose - exported.
labels: LabelModeHow objects are named on the drawing: their whole title, or a short code
(H0, W3, F1…) and a legend beside it.
paints: Vec<(String, Paint)>What the front end’s scene paints along an object, by key: one colour per node, resolved by the front end from what its 3D view already holds (a property, the strata) - never a second resolution here (the resolver is supplied by the front end). An object without one is drawn as before: that is the default resolver.
joints: JointMarks along a painted well - at every node, or where its colour changes - the 3D view’s joints.
zoom_script: boolWrite, into the SVG, the script that lets it zoom itself when opened alone in a browser: lines keep their width in pixels, objects part (on by default).
strata_legend: boolA legend of the stratigraphic units the drawn wells show, each with the
colour its interval is drawn in, on the left of the drawing and in a
group of its own (<g id="strata-legend">, an Inkscape layer) that is
easy to move or edit. Off by default, and then not
written into the metadata: a drawing made before the option existed
is the same bytes.
strata_ticks: boolA short black tick across the well at every boundary between two intervals of a strata-coloured well, in the well’s own group. Off by default, and then not written into the metadata.
draw_unstratified: boolUnder strata colouring, draw the portions of a well that carry no strata information (below the last interval, between two) in the well’s own colour - as drawings always did. Off: a well is drawn only where a unit is known (its head and label stay), and a note counts the wells that lost portions. On by default, and then not written into the metadata, so earlier drawings keep their bytes.
A legacy alias of UnstratifiedStyle::Hidden, kept so that every
document written before the styles still reads: false here is the same
as unstratified: hidden, and wins over it (View::unstratified_style
is the one place that decides). New code sets unstratified.
unstratified: UnstratifiedStyleHow the portions of a well with no strata information are drawn, under
strata colouring (several styles are offered: fixed colour, texture, dashes…). The default is the solid neutral grey drawings always had,
and then it is not written into the metadata, so earlier drawings
keep their bytes. crate::style::declared lists the styles and their
parameters; the front end builds its form from that list.
store_names: Vec<(String, String)>What each package is called, by the front end’s store id (s1 → the file’s
name): the strata legend writes it beside a unit shown more than once -
the same unit, two colours, because two packages do not agree on it
(the legend says which package the entries sharing a name come from). A store with no name
here is named by its id. Empty, and then not written into the
metadata, so earlier drawings keep their bytes.
markers: Vec<Marker>Named markers on a set of objects - a symbol or a contour at the head, the bottom or a depth of each - listed in a legend of their own (ADR-0015). Empty, and then not written into the metadata, so earlier drawings keep their bytes.
Implementations§
Source§impl View
impl View
Sourcepub fn unstratified_style(&self) -> UnstratifiedStyle
pub fn unstratified_style(&self) -> UnstratifiedStyle
The style the unstratified portions are drawn in: hidden when the
legacy draw_unstratified is off, whatever unstratified says - the one
place the two are read together.