I use the "Offset Point Symbol" tool and a geometry generator symbology to create dynamic leader lines. A sample file is available at http://hub.qgis.org/issues/15201 (Add snapping for 'Offset Point Symbol' tool).
Because I need a circle symbology without fill in some projects, I want to shorten the leader lines by the radius of the cirle symbology.
Can anyone help me with the expression? Symbology units are in meter ('Map units').
make_line (
make_point(
$x + regexp_substr("offset", '([^,]*)'),
$y - regexp_substr("offset", '([^,]*$)')
),
$geometry
)
Based on the answer posted by underdark I've created an expression that works properly:
-- radius = 2m
difference(
make_line (
make_point(
$x + regexp_substr("offset", '([^,]*)'),
$y - regexp_substr("offset", '([^,]*$)')
),
$geometry
),
buffer(make_point(
$x + regexp_substr("offset", '([^,]*)'),
$y - regexp_substr("offset", '([^,]*$)')
), 2)
)