An SVG keeps every picture at full resolution, whatever size it is
drawn at: a folio with 22 phone photos shown at a tenth of their size
gave a 270 MB SVG and took 65 s to write, most of it compressing the
photos again.
The export dialog gets "SVG: smaller pictures" (off by default, kept
with the other export settings), and --export-svg gets
--svg-small-pictures. With it, a picture is stored at four times the
size it is drawn at when that is smaller than the picture; smaller
pictures stay whole. Four times is about 375 dpi on a printed folio.
The exporter sets Diagram::smallPictures() for its own drawing only,
so screen, print, PDF and PNG are unchanged. It is not part of
applyProperties(), which every format uses.
On that project: --export-svg 84.9 s -> 34.5 s (opening is 20 s of
both), 270 MB -> 57 MB, peak memory 2.45 -> 1.86 GB. Rendered at twice
the folio size, the two SVGs differ by more than 32/255 on 0.23 % of
pixels, along photo detail.
tst_svgsmallpictures: an 800x600 picture drawn at 0.1 is stored at
320x240 with the option, through --export-svg and through the
dialog's QPicture route, and at 800x600 without it; a 40x30 picture
stays whole. It fails when the factor is changed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With symbols as blocks and the new "DXF : textes des symboles en
attributs" option (--dxf-attributes on the command line), a symbol's own
texts (its label, function, comment...) are attributes of its INSERT
instead of loose texts, so a CAD program moves them with the symbol and
can list or edit them. Each is written exactly where, and as, the text
was. A text showing an information field is tagged with its name
(LABEL, FUNCTION...), a typed text TEXT1, TEXT2...; a text's second line
gets _2. The block defines each tag once, placed where the first symbol
has it.
Its own option, off by default, because LibreCAD (2.2.1.5) does not
show attributes: the labels would vanish there. AutoCAD shows them.
The text geometry moves into textLines(), shared with the text loop,
so the attributes and the plain texts cannot drift apart.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With "DXF : symboles en blocs" ticked in the export dialog, or
--dxf-blocks on the command line, each symbol definition a folio uses is
written once as a DXF block and every placed symbol as an INSERT of it.
A CAD program then selects, counts and replaces a symbol as one object.
The block is drawn by the same code as a symbol drawn in full, as if
the symbol sat unturned at the folio's origin, which is DXF (0,
sheetHeight): that is the block's base point, so the INSERT carries the
symbol's position and quarter-turn and nothing else. Blocks have to come
before any entity, so the export collects them first and dxfBegin()
writes them in its BLOCKS section. Entities in a block keep their own
layers. Off by default; with it off the file is unchanged.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Default properties is now a static method of the propertie class himself
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@3400 bfdf4180-ca20-0410-9c96-a3a8aa849046