milo-minderbinder / AWS-PlantUML

PlantUML sprites, macros, and other includes for AWS components.
MIT License
643 stars 67 forks source link

how to change the size #26

Closed lqueryvg closed 6 years ago

lqueryvg commented 6 years ago

Hi,

Sorry if this is actually a PlantUML question.

Is there a way to make the icons smaller ? I know that with sprites you can do something like...

<$my_sprite{scale=0.5}>

But I don't know how to combine that syntax with your macros...

Thanks in advance.

lqueryvg commented 6 years ago

P.S. I like the your Github name - he's one of my favourite characters from the book ;-)

milo-minderbinder commented 6 years ago

Great question! Tbh, I was not aware of that syntax, so I’ll have to check if there’s an easy way to do that with the macros out of the box. I suspect, though, that I’ll have to make a slight change or add a new macro with a sprite scale parameter. Will get back to you ASAP!

And glad you caught the reference! Catch-22 is one of my favorites!

milo-minderbinder commented 6 years ago

@lqueryvg sorry for the delay, but I took a look and scaling the sprites is actually already possible. At the moment, you need to use the 6 parameter entity macros, and just add the scale factor to the sprite name provided in the last (6th) parameter. See an example here: http://www.plantuml.com/plantuml/uml/bOxRojD04CVlzocs5SH2aksXWWXAGoaYj3RqeE1Ds2JJTkaUmkmiIaNmHNmvdyIrRTIBxxluBdR_Cmo_cT_CaqGAHZD_LhQLA0rlu223fXryfLohepLWYTVn0sIi5wVA0iy_ROlzQibFHAr_BGJABzbHqIbKmGFMpb84ijePOPHsgL6s0QokluXiMcXfAIuG21ga1p5wbOxJyLWqoXFhALlhq410tLqISPTnDckZx8FpBJcKHn2vaHTdjvE_HRdCD-yMJm2hK9-1xl4uDtUc3THn7ukvG1TxlCSDPFag_xp-q5cyy9DIMGAqKYU_VlpKiW8TC_4tYUJPOlXoCfqcdKnNtFbllfOQtWopqVS1cwzNnNwtA6ydea2vMST-y-T8Av4iOCBxxxbMP-24KbdFjIFFdryZuGVdU2Knlaj_mFvJusdwbl_RmcPWcs3qRm00

milo-minderbinder commented 6 years ago

If this is a common use case, I might consider adding either a third macro definition to make it more convenient to scale the sprite, or perhaps just reorder the default arguments for the 6 parameter constructor so users can define a custom/scaled sprite without having to explicitly define the other less-used parameters. Any thoughts?