Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

PlantUML: zoom the diagram using scale command

‘scale’ command is used to zoom the generated image. There are multiple ways to express the Scale.

Example 1: Express scale factor as a number or fraction.

scale 2.5

scale 3/2

 

Example 2: Specify either width or height in pixels.

scale 250 width

scale 350 height

 

Example 3: Specify both width and height.

scale 250*350

 

How to Set Maximum Height, width?

Using ‘scale max’ keyword, we can set maximum height and width.

 

scale max 350*250

scale max 500 width

scale max 1024 height

 

withoutScale.txt

@startuml

Client -> LoginServer: Enter user name
Client -> LoginServer: Enter password
Client -> LoginServer: Submit the form 
LoginServer -> ADServer: Check the credentials
ADServer -> LoginServer: Login Successful
LoginServer -> Client: Login Successful

@enduml

 

Above snippet generate below diagram.

 


With scale 500*1024

 

scale1.txt

@startuml

scale 500*1024

Client -> LoginServer: Enter user name
Client -> LoginServer: Enter password
Client -> LoginServer: Submit the form 
LoginServer -> ADServer: Check the credentials
ADServer -> LoginServer: Login Successful
LoginServer -> Client: Login Successful

@enduml

 

 

 


  

Previous                                                    Next                                                    Home


This post first appeared on Java Tutorial : Blog To Learn Java Programming, please read the originial post: here

Share the post

PlantUML: zoom the diagram using scale command

×

Subscribe to Java Tutorial : Blog To Learn Java Programming

Get updates delivered right to your inbox!

Thank you for your subscription

×