diff --git a/ROADMAP.md b/ROADMAP.md index 768679f71d..a8209f3a37 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -211,7 +211,8 @@ And alongside it: ([#995](https://github.com/opengeos/RustGIS/issues/995)); line labels that try other places along the line (an offset above or below it is done) ([#1187](https://github.com/opengeos/RustGIS/issues/1187)). - Kernel density (heat map) as a renderer; point clustering. -- QGIS SVG markers brought in by the style importer (PNG, JPEG and SVG pictures are done, +- QGIS SVG markers brought in by the style importer with the colours the style sets (`param(…)`), + or from QGIS's own SVG library (PNG, JPEG and other SVG marker images are done, [#2266](https://github.com/opengeos/RustGIS/issues/2266)), image fill patterns and a symbol library. - A legend and colour bar on the map (layouts have both). diff --git a/crates/engine/src/cmd/qgis.rs b/crates/engine/src/cmd/qgis.rs index c811d84af4..788158906e 100644 --- a/crates/engine/src/cmd/qgis.rs +++ b/crates/engine/src/cmd/qgis.rs @@ -58,12 +58,12 @@ fn file_dir(p: &Value) -> Option { }) } -/// The most bytes of base64 of raster marker images one import reads: what a run keeps +/// The most bytes of base64 of raster and SVG marker images one import reads: what a run keeps /// (`MAX_PICTURES_BYTES`), counting those that turn out not to draw too, so a project naming many /// files that aren't images reads no more than one of images (in tests, a few small images'). const MARKER_READ_BYTES: usize = if cfg!(test) { 1 << 10 } else { rustgis_map::symbology::MAX_PICTURES_BYTES }; -/// The importer's reader of raster image markers' images ([`qgis::ReadImage`]): [`marker_image`] +/// The importer's reader of raster image and SVG markers' images ([`qgis::ReadImage`]): [`marker_image`] /// within [`MARKER_READ_BYTES`] for the import. On the import's thread, as the rest of it is /// (`import_project` says why; `import_style` reads on a thread of its own in the desktop app, /// [`style_ahead`]): each read is one file of at most 1.5 MiB, only a regular file is opened (a @@ -84,7 +84,7 @@ fn marker_images() -> impl FnMut(&str) -> Result<(String, f32), &'static str> { } } -/// Reads a raster image marker's image for the importer: its `base64:` text, or its file's, +/// Reads a raster image or SVG marker's image for the importer: its `base64:` text, or its file's, /// within what a picture marker keeps (`symbology::MAX_PICTURE_BYTES` of base64, 2 MiB), checked /// as `layer.marker` checks an image; with its height over its width. Its base64's length is added /// to `read`, or for a file that doesn't read (past the limit, or failing part way) what was read @@ -113,7 +113,7 @@ fn marker_image(source: &str, read: &mut usize) -> Result<(String, f32), &'stati // doesn't open). *read += e.read().div_ceil(3) * 4; return Err(match e { - PictureFileError::Unopened(_) => "whose image file doesn't open", + PictureFileError::Unopened(_) => qgis::IMAGE_UNOPENED, PictureFileError::TooLarge(_) => TOO_LARGE, PictureFileError::Unread(..) => "whose image file fails as it is read", }); @@ -152,7 +152,7 @@ fn read_file(path: &str) -> Result, String> { /// wait for its metadata, as Add Data adds one.) Its work is bounded by the project: at most /// [`qgis::MAX_LAYERS`] layers, each read once by the command that adds it (a file's layers, and /// a virtual layer on one, each read their file), archives added without waiting for their -/// metadata, annotation pictures within [`MAX_PICTURE_BYTES`], raster image markers' images within +/// metadata, annotation pictures within [`MAX_PICTURE_BYTES`], raster image and SVG markers' images within /// [`MARKER_READ_BYTES`] (each file once, at most 1,024 of them, before any layer is added: see /// [`marker_images`]). A local archive's file is looked /// for on this thread (`is_file`), which a slow network share can hold up, and a web service's @@ -2053,7 +2053,7 @@ fn notify_report(s: &mut Session, report: &Report) { type StyleRead = Result<(qgis::Style, Report), String>; /// Reads and parses the style file `p` names (or gives) for the layer called `layer`: its raster -/// image markers' relative files start from the style file's folder. +/// and SVG image markers' relative files start from the style file's folder. fn read_style_file(p: &Value, layer: &str) -> StyleRead { let text = qgis_text(p)?; rustgis_data::progress::check().map_err(|e| e.to_string())?; @@ -2091,7 +2091,7 @@ pub(crate) fn style_ahead(s: &Session, p: &Value) -> Option CmdResult { diff --git a/crates/engine/src/tests.rs b/crates/engine/src/tests.rs index e373d11c5c..b8c40b015a 100644 --- a/crates/engine/src/tests.rs +++ b/crates/engine/src/tests.rs @@ -4304,6 +4304,50 @@ fn qgis_raster_image_markers_read_their_files_from_the_style_folder() { } } +/// A QGIS style's and project's SVG markers draw their file through the importer's one reader, and +/// saving asks for `svg-markers`; one whose colours the style sets is a circle, noted. +#[test] +#[cfg(not(target_arch = "wasm32"))] +fn qgis_svg_markers_draw_their_file_and_saving_requires_svg_markers() { + use base64::Engine; + use rustgis_map::{Marker, Picture}; + let dir = std::env::temp_dir().join(format!("rustgis-qgis-svg-markers-{}", std::process::id())); + let _ = std::fs::remove_dir_all(&dir); + std::fs::create_dir_all(&dir).unwrap(); + let svg = r##""##; + std::fs::write(dir.join("pin.svg"), svg).unwrap(); + std::fs::write(dir.join("tinted.svg"), svg.replace("#c81e1e", "param(fill) #c81e1e")).unwrap(); + let qml = |file: &str| { + format!( + r#" + "# + ) + }; + let marker = |s: &Session| s.map().layer_by_name("Cities").unwrap().symbol(0).marker; + let notes = + |r: &serde_json::Value| r["notes"].as_array().unwrap().iter().map(|n| n["text"].as_str().unwrap().to_string()).collect::>(); + let b64 = base64::engine::general_purpose::STANDARD.encode(svg); + let path = dir.join("pins.qml"); + // From its file beside the style, and embedded in the text with no folder. + for params in + [json!({"layer": "Cities", "path": path.to_string_lossy()}), json!({"layer": "Cities", "text": qml(&format!("base64:{b64}"))})] + { + std::fs::write(&path, qml("pin.svg")).unwrap(); + let mut s = world(); + let r = s.run("style.importQgis", ¶ms).unwrap(); + assert_eq!(marker(&s), Marker::Picture(Picture::new(&b64)), "{params}"); + assert!(notes(&r).is_empty(), "{:?}", notes(&r)); + assert_eq!(serde_json::to_value(&s.project).unwrap()["requires"], json!(["picture-markers", "svg-markers"])); + } + std::fs::write(&path, qml("tinted.svg")).unwrap(); + let mut s = world(); + let r = s.run("style.importQgis", &json!({"layer": "Cities", "path": path.to_string_lossy()})).unwrap(); + assert_eq!(marker(&s), Marker::Circle); + assert_eq!(notes(&r), ["SVG markers whose colours the style sets, which RustGIS doesn't apply yet, drawn as circles"]); + let _ = std::fs::remove_dir_all(&dir); +} + /// A QGIS style's file and its raster image markers' images are read on a thread before the /// command lands (#2620): the landing needs neither file, says what the inline import says, can be /// undone, and a style read for a layer that was renamed meanwhile is refused. A cancelled read @@ -6450,7 +6494,7 @@ fn a_qgis_project_opens_as_a_map_and_a_qgis_style_styles_a_layer() { wurl=https://wms.example/wms&layers=aWebwms 6"#; let mut report = rustgis_map::qgis::Report::default(); - let project = rustgis_map::qgis::read_project(web, "", &mut |_| Err("whose image file doesn't open"), &mut report).unwrap(); + let project = rustgis_map::qgis::read_project(web, "", &mut |_| Err(rustgis_map::qgis::IMAGE_UNOPENED), &mut report).unwrap(); let mut w = world(); let before = w.active_layer; w.active_layer = w.map().layers.iter().map(|l| l.id).find(|id| Some(*id) != before); diff --git a/crates/map/src/qgis/mod.rs b/crates/map/src/qgis/mod.rs index 6252493d72..597a93552e 100644 --- a/crates/map/src/qgis/mod.rs +++ b/crates/map/src/qgis/mod.rs @@ -28,7 +28,7 @@ use serde::Serialize; use crate::Rgba; use crate::effects::Blend; -use crate::symbology::{Labeling, LineStroke, MarkerRotation, Picture, Renderer}; +use crate::symbology::{Labeling, LineStroke, MarkerRotation, Renderer}; pub use annotation::{Annotation, MAX_ITEMS as MAX_ANNOTATIONS}; pub use expr::{reads_measure, to_sql}; use rustgis_data::loss::LossCode; @@ -64,18 +64,22 @@ pub struct Report { /// Where each closing note is in `notes`, kept in step by [`Report::forget`]. #[serde(skip)] closing: HashMap<(NoteKind, Option), usize>, - /// Raster image markers' images by their `imageFile`, read before the symbols showing them - /// (`symbol::read_images`): each kept picture with its height over its width, or why it isn't - /// drawn. Carried here because every symbol reader already takes the report; passing them - /// beside it would add a parameter to each reader and to each of their callers. + /// Raster image and SVG markers' images by their path (`imageFile`, `name`), read before the + /// symbols showing them (`symbol::read_images`): each kept image, or why it isn't drawn. + /// Carried here because every symbol reader already takes the report; passing them beside it + /// would add a parameter to each reader and to each of their callers. #[serde(skip)] - images: HashMap>, + images: HashMap>, } -/// Reads a raster image marker's image for the importer, which opens no file itself: given its +/// A [`ReadImage`]'s reason for a file that doesn't open. +pub const IMAGE_UNOPENED: &str = "whose image file doesn't open"; + +/// Reads a raster image or SVG marker's image for the importer, which opens no file itself: given its /// `base64:` text or its file's path (made absolute from the project's folder), the image as /// base64 and its height over its width, or why it isn't drawn, as the end of a note's -/// "raster image markers …, drawn as circles" (such as "whose file doesn't open"). +/// "raster image markers …, drawn as circles" or "SVG markers …, drawn as circles" (such as +/// [`IMAGE_UNOPENED`]). pub type ReadImage<'a> = dyn FnMut(&str) -> Result<(String, f32), &'static str> + 'a; /// One thing an import couldn't carry over as QGIS has it. @@ -569,7 +573,7 @@ pub struct ProjectLayer { } /// Reads a QGIS project. `dir` is the folder the project is in, which its relative paths start -/// from; `images` reads its raster image markers' images. Notes on what can't be carried over go +/// from; `images` reads its raster image and SVG markers' images. Notes on what can't be carried over go /// to `report`. pub fn read_project(text: &str, dir: &str, images: &mut ReadImage, report: &mut Report) -> Result { let doc = parse(text, "a QGIS project")?; diff --git a/crates/map/src/qgis/symbol.rs b/crates/map/src/qgis/symbol.rs index 6746d73436..93feb79f90 100644 --- a/crates/map/src/qgis/symbol.rs +++ b/crates/map/src/qgis/symbol.rs @@ -1,7 +1,7 @@ //! QGIS symbols (``) as a RustGIS [`Symbol`], and a line's //! symbol layers as stacked [`LineStroke`]s. A symbol layer RustGIS has no match for is drawn -//! as near as it can (a pattern fill as a tint of its colour, an SVG marker as a circle in its -//! colour) or left out, and noted. +//! as near as it can (a pattern fill as a tint of its colour, an SVG marker whose colours the style +//! sets as a circle in its colour) or left out, and noted. use roxmltree::Node; @@ -663,7 +663,7 @@ fn along(l: Node, p: &[(String, String)], hash: bool, reference: Option, la let stroke = if hash { hash_mark(class, &sp, p, base, reference, layer, report) } else { - marker_mark(class, &sp, class == "RasterMarker" && name_from_expression(sub), base, reference, layer, report) + marker_mark(class, &sp, image_file_key(class).is_some() && name_from_expression(sub), base, reference, layer, report) }; if let Some(mut st) = stroke { // An image mark is drawn at the layer's opacity alone. @@ -730,8 +730,10 @@ fn marker_mark( }) } "FontMarker" => font_char(p, layer, report)?, - "RasterMarker" => raster_image(p, from_expression, layer, report).map_or(Marker::Circle, |(picture, _)| Marker::Picture(picture)), - "SvgMarker" | "EllipseMarker" | "FilledMarker" => { + "RasterMarker" | "SvgMarker" => { + marker_image(class, p, from_expression, layer, report).map_or(Marker::Circle, |image| Marker::Picture(image.picture)) + } + "EllipseMarker" | "FilledMarker" => { report.approximated(layer, format!("{} markers, drawn as circles in their colour", marker_name(class))); Marker::Circle } @@ -744,7 +746,7 @@ fn marker_mark( report.approximated(layer, "font markers anchored off their centre, drawn centred"); } if matches!(shape, Marker::Picture(_)) && anchored(p) { - report.approximated(layer, "raster image markers along lines anchored off their centre, drawn centred"); + report.approximated(layer, "image markers along lines anchored off their centre, drawn centred"); } let fill = prop(p, "color").and_then(color).unwrap_or(Rgba::new(0, 0, 0, 0)); let outline = if prop(p, "outline_style") == Some("no") { None } else { prop(p, "outline_color").and_then(color) }; @@ -835,14 +837,14 @@ fn marker(layers: &[(Node, Props)], reference: Option, still: bool, layer: Some(m) => m, None => continue, }, - "RasterMarker" => match raster_image(p, name_from_expression(*l), layer, report) { - Some((picture, a)) => { - aspect = a; - Marker::Picture(picture) + "RasterMarker" | "SvgMarker" => match marker_image(class, p, name_from_expression(*l), layer, report) { + Some(image) => { + aspect = image.aspect; + Marker::Picture(image.picture) } None => Marker::Circle, }, - "SvgMarker" | "EllipseMarker" | "FilledMarker" => { + "EllipseMarker" | "FilledMarker" => { report.approximated(layer, format!("{} markers, drawn as circles in their colour", marker_name(class))); Marker::Circle } @@ -905,10 +907,11 @@ fn network_share(file: &str) -> bool { file.len() > 1 && file.chars().take(2).all(|c| c == '\\' || c == '/') } -/// Reads the images of the raster image markers under `root` (a project or a style), each -/// `imageFile` once (a file once for each spelling of its path from the folder: a leading `./` is -/// dropped, so `./a.png` and `a.png` are one), into the report for [`raster_image`]: a `base64:` -/// one as it is, a file's through `read` (relative to `dir`; a `file:` address is the file it names). +/// Reads the images of the raster image and SVG markers under `root` (a project or a style), each +/// `imageFile` or SVG `name` once (a file once for each spelling of its path from the folder: a +/// leading `./` is dropped, so `./a.png` and `a.png` are one), into the report for +/// [`marker_image`]: a `base64:` one as it is, a file's through `read` (relative to `dir`; a +/// `file:` address is the file it names). /// One at a web address isn't fetched, nor one on a network share (`\\host\share`, `//host/share`, /// `file://host/share`), nor one kept inside a `.qgz` /// (`attachment:`); one relative to no folder (or to a drive's working folder) isn't looked @@ -919,11 +922,11 @@ fn network_share(file: &str) -> bool { pub(super) fn read_images(root: Node, dir: &str, read: &mut ReadImage, report: &mut Report) { let (mut bytes, mut reads) = (0, 0); // A file's image by its path from the folder (`./a.png` and `a.png` are one). - let mut files = std::collections::HashMap::>::new(); - let rasters = root.descendants().filter(|n| n.has_tag_name("layer") && n.attribute("class") == Some("RasterMarker")); - for l in rasters.filter(|l| l.attribute("enabled") != Some("0")) { + let mut files = std::collections::HashMap::>::new(); + let layers = root.descendants().filter(|n| n.has_tag_name("layer") && n.attribute("enabled") != Some("0")); + for (l, key) in layers.filter_map(|l| Some((l, image_file_key(l.attribute("class")?)?))) { let p = props(l); - let Some(file) = prop(&p, "imageFile").map(str::trim).filter(|f| !f.is_empty()) else { continue }; + let Some(file) = prop(&p, key).map(str::trim).filter(|f| !f.is_empty()) else { continue }; if report.images.contains_key(file) { continue; } @@ -988,7 +991,7 @@ pub(super) fn read_images(root: Node, dir: &str, read: &mut ReadImage, report: & return Err("past the images RustGIS keeps".to_string()); } bytes += b64.len(); - Ok((picture, aspect)) + Ok(MarkerImage { picture, aspect, sets_colours: sets_colours(&b64) }) }); if let Ok(Some(path)) = source { files.insert(path, kept.clone()); @@ -999,36 +1002,78 @@ pub(super) fn read_images(root: Node, dir: &str, read: &mut ReadImage, report: & /// The note for image markers drawn opaque where QGIS draws them see-through: once per symbol /// ([`read`]). -const SEE_THROUGH_IMAGES: &str = "see-through raster image markers, drawn opaque"; +const SEE_THROUGH_IMAGES: &str = "see-through image markers, drawn opaque"; + +/// A marker's image as read for the import. +#[derive(Debug, Clone, Copy, PartialEq)] +pub(super) struct MarkerImage { + picture: Picture, + /// Its height over its width. + aspect: f32, + /// Whether it is an SVG leaving colours to the style (`param(fill)` and the like). + sets_colours: bool, +} + +/// The setting naming a marker layer `class`'s image file; none for one that shows no file. +fn image_file_key(class: &str) -> Option<&'static str> { + match class { + "RasterMarker" => Some("imageFile"), + "SvgMarker" => Some("name"), + _ => None, + } +} + +/// Whether the image `b64` is an SVG leaving colours to the style: QGIS's `param(…)`, written in +/// any letter case, in an attribute's value or a `"#, + ] { + assert_eq!(circle("a.svg", "/styles", &mut svg_reader(body)), [SVG_COLOURS], "{body}"); + } + // `param(` where it sets nothing leaves the SVG its own colours. + for body in + [r##""##, r#"param(fill)param(outline)"#] + { + let mut report = Report::default(); + let s = + super::read_style(&marker_qml("1", &svg_marker("a.svg", "")), "Pins", "/styles", &mut svg_reader(body), &mut report).unwrap(); + let Some(Renderer::Single(sym)) = &s.renderer else { panic!("{:?}", s.renderer) }; + assert!(matches!(sym.marker, Marker::Picture(_)), "{body}: {:?}", report.notes); + assert!(report.notes.is_empty(), "{body}: {:?}", report.notes); + } + // The same file as a raster image marker's draws as it is. + let both = format!("{}{}", raster_marker("a.svg", ""), svg_marker("a.svg", "")); + let mut report = Report::default(); + let mut read = svg_reader(r#""#); + let s = super::read_style(&marker_qml("1", &both), "Pins", "/styles", &mut read, &mut report).unwrap(); + let marks: Vec<_> = s.line_strokes.unwrap().iter().filter_map(|m| m.markers.map(|k| k.mark)).collect(); + assert!(matches!(marks[..], [LineMark::Marker(Marker::Picture(_)), LineMark::Marker(Marker::Circle)]), "{marks:?}"); + assert_eq!(report.notes.iter().map(|n| n.text.as_str()).collect::>(), [SVG_COLOURS]); +} + /// A raster image marker layer showing `file`, 4 mm wide, with `extra` settings. fn raster_marker(file: &str, extra: &str) -> String { format!( @@ -1474,14 +1644,14 @@ fn raster_image_markers_draw_their_image_read_once_from_the_style_folder() { let mut report = Report::default(); let faded = line.replace(r#"name="@0@0" alpha="1""#, r#"name="@0@0" alpha="0.5""#); super::read_style(&faded, "Road", "", &mut read, &mut report).unwrap(); - assert_eq!(report.notes.iter().map(|n| n.text.as_str()).collect::>(), ["see-through raster image markers, drawn opaque"]); + assert_eq!(report.notes.iter().map(|n| n.text.as_str()).collect::>(), ["see-through image markers, drawn opaque"]); // The line see-through as well: one symbol, one note. let mut report = Report::default(); let both = faded.replace(r#"type="line" name="0" alpha="1""#, r#"type="line" name="0" alpha="0.5""#); assert_ne!(both, faded); super::read_style(&both, "Road", "", &mut read, &mut report).unwrap(); let notes: Vec<_> = report.notes.iter().map(|n| (n.text.as_str(), n.count)).collect(); - assert_eq!(notes, [("see-through raster image markers, drawn opaque", 1)]); + assert_eq!(notes, [("see-through image markers, drawn opaque", 1)]); } /// A `file:` address is the file it names, read as a tile archive's address is (decoded, from the @@ -1606,7 +1776,7 @@ fn raster_image_markers_that_cant_be_drawn_are_circles_saying_why() { let mut asked = Vec::new(); let mut read = |source: &str| { asked.push(source.to_string()); - if source.ends_with("gone.png") { Err("whose image file doesn't open") } else { Ok(("QUJD".to_string(), 1.0)) } + if source.ends_with("gone.png") { Err(super::IMAGE_UNOPENED) } else { Ok(("QUJD".to_string(), 1.0)) } }; let cases = [ ("", "raster image markers with no image, drawn as circles"), @@ -1663,10 +1833,7 @@ fn raster_image_markers_that_cant_be_drawn_are_circles_saying_why() { let notes: Vec<_> = report.notes.iter().map(|n| (n.text.as_str(), n.count)).collect(); assert_eq!( notes, - [ - ("raster image markers of a fixed aspect ratio, drawn in their image's own", 1), - ("see-through raster image markers, drawn opaque", 1) - ] + [("image markers of a fixed aspect ratio, drawn in their image's own", 1), ("see-through image markers, drawn opaque", 1)] ); // A ratio that is the image's own is no change; a switched-off layer's image isn't read. let mut asked = 0; diff --git a/crates/map/src/symbology.rs b/crates/map/src/symbology.rs index fe006a50f5..db71a882d4 100644 --- a/crates/map/src/symbology.rs +++ b/crates/map/src/symbology.rs @@ -20,7 +20,7 @@ pub enum Marker { Star, /// A character of a font, as QGIS's font markers draw one: the size is the font's em. Char(Glyph), - /// A PNG, JPEG or SVG image, as QGIS's raster image markers draw one: the size is its width, + /// A PNG, JPEG or SVG image, as QGIS's raster image and SVG markers draw one: the size is its width, /// its height as the image's proportions make it. Its fill and outline don't change it. Picture(Picture), } diff --git a/crates/ui-egui/src/readjob.rs b/crates/ui-egui/src/readjob.rs index e522901dee..aeaecdb4b3 100644 --- a/crates/ui-egui/src/readjob.rs +++ b/crates/ui-egui/src/readjob.rs @@ -1711,7 +1711,7 @@ mod tests { assert_eq!(step.params["layer"], json!("towns")); } - /// Import QGIS Style reads its file and its raster image markers' images on a thread first + /// Import QGIS Style reads its file and its raster image and SVG markers' images on a thread first /// (#2620): the layer is styled when they have been read, with the notes the command gives. #[test] fn a_qgis_style_is_read_on_a_thread_before_it_lands() { diff --git a/docs/user-guide/cartography.md b/docs/user-guide/cartography.md index 4b193cb376..1478f3f7bc 100644 --- a/docs/user-guide/cartography.md +++ b/docs/user-guide/cartography.md @@ -129,7 +129,7 @@ vector export keeps a compressed copy of each image it draws, at most about as m MiB in all), which counts too and leaves less for new images. An image marker's size is its width, and it is as tall as its proportions make it, as QGIS draws a -raster image marker; the symbol's fill and outline don't show. It turns with **Rotation**, is ringed +raster image or SVG marker; the symbol's fill and outline don't show. It turns with **Rotation**, is ringed when selected, and is kept in the project file. A project that has one opens only in a RustGIS that draws them. An image that doesn't decode draws a circle, so the point still shows; opening a project, map file or layer file, or adding styles, says which layers and styles have such an image, diff --git a/docs/user-guide/workspace.md b/docs/user-guide/workspace.md index 554040679d..522ef3246a 100644 --- a/docs/user-guide/workspace.md +++ b/docs/user-guide/workspace.md @@ -345,7 +345,7 @@ Each layer keeps its look: rendering passes as their levels when the renderer draws in symbol levels; marker and hashed lines as strokes of markers or hash marks, at their places (intervals, vertices, the ends, the middle), turned with the line, their markers' offsets and angles kept; font markers as - characters of their font, on points and along lines; raster image markers as + characters of their font, on points and along lines; raster image and SVG markers as [image markers](cartography.md#symbology) of their PNG, JPEG or SVG (embedded in the file, or a file of their own, relative to the project's folder or, in a style, to the style's), on points (anchored where QGIS anchors them) and along lines; a marker symbol of several layers, or one @@ -430,11 +430,11 @@ filter, read by OGR SQL, ignores ASCII case in `=`, `IN`, `<`, `>` and `BETWEEN` apart in `LIKE`. A layer whose filter or rules compare text that way is noted, as is a `NOT IN` list holding `NULL`, which QGIS takes as unknown and RustGIS skips. What RustGIS doesn't draw as QGIS does is drawn as near as it can, or left out, and said: the import's notes list, layer by layer, what was -approximated (vector tile styles, text matched ignoring letter case, a memory layer's fields of kinds RustGIS hasn't as text, gradient and shapeburst fills' offsets left out and colour ramps other than gradients drawn from their first colour to their last, SVG, raster and random fills and dense brushes as a tint of their colour, SVG markers as circles, -raster image markers whose image RustGIS can't use as circles (one at a web address, which it +approximated (vector tile styles, text matched ignoring letter case, a memory layer's fields of kinds RustGIS hasn't as text, gradient and shapeburst fills' offsets left out and colour ramps other than gradients drawn from their first colour to their last, SVG, raster and random fills and dense brushes as a tint of their colour, +raster image and SVG markers whose image RustGIS can't use as circles (one at a web address, which it doesn't fetch, on a network share (`\\host\share`, `file://host/share`), a relative name with `://` in it, or kept inside a `.qgz`; one a field or an expression gives, which RustGIS doesn't evaluate; a file that doesn't open or isn't a PNG, JPEG or SVG; one past 2 MiB of base64, 2048 × 2048 pixels or as much to draw, an SVG with filters, text, images, animation or links to other files, the images it keeps or the pixels or memory of marker images it decodes -until it restarts), those of a fixed aspect ratio in their image's own, +until it restarts; an SVG whose colours the style sets; an SVG of QGIS's own library, which RustGIS doesn't bring), image markers of a fixed aspect ratio in their image's own, see-through ones opaque and those anchored off their centre along lines centred, dashed polygon outlines solid, label halos with sharp corners drawn round and blended ones drawn over the map, label backgrounds of other shapes drawn as rectangles, label distances from lines @@ -456,7 +456,7 @@ A QGIS layer style (`.qml`) styles the selected layer the same way, a feature la "…/roads.qml"}`). A raster style that reads a band the raster hasn't is noted and leaves the raster as it was. On a raster still loading (a remote file), the bands can't be checked yet: the style is applied, noted as unchecked, and a band the file hasn't is drawn from its last band. -In the desktop app the style file and its raster image markers' image files are read in the +In the desktop app the style file and its raster image and SVG markers' files are read in the background, with Cancel: the layer is styled once they are read, and a cancelled import leaves it as it was. RustGIS works out a map's scale with the OGC's 0.28 mm screen pixel, QGIS at 96 pixels to the