I want to place a legend in a graph constructed with graphics primitives. Because some other elements use DropShadowing[{6,-6}]
and RoundingRadius->x
I want to use that in the frame of the legend, but I do not know how the LegendFuntion->"Frame"
would allow customization. (I also want to control the Thickness
of the frame.)
My effort to illustrate the problem is a Rectangle
with DropShadowing
and a legend that is a frame:
Legended[Graphics[{[email protected], FaceForm@None, EdgeForm@Thick,
Rectangle[corner = {8, ySize = 5} (sclg = .8), -corner],
FaceForm[White], DropShadowing[{6, -6}],
Rectangle[{-2, 0}, {0, 3}, RoundingRadius -> .1]}
, ImageSize -> 1667],
Placed[PointLegend[{Red, Blue, Red, Blue, Red, Blue, Red, Blue, Red,
Blue}, {"One", "Two", "One", "Two", "One", "Two", "One", "Two",
"One", "Two"}, LegendMarkers -> Graphics@Rectangle[],
LegendMarkerSize -> 15, LegendFunction -> "Frame",
LegendLabel -> "Legend",
LegendLayout -> "Row"], {.15, .81}]]
Thanks for your thoughts! (I shall grant you that the documentation contains a sample function for creating a drop-shadow legend, but that seems not to automatically adjust size as the legend changes and uses neither DropShadowing
nor RoundingRadius
which would likely simplify things.)