Clamps Dictionary
set-page-dimensions
Function
(set-page-dimensions body width height &key (scale 1.0))
Set the page dimensions of the body of a clog html page given its body in rem units. The minimum font-size of the HTML will be scaled that in full screen display 1 rem equals 10 px. Use this function in the gui creation function to change the aspect ratio of a page. The optional scale will scale the width and height of the page proportionally, resuling in a reciprocal scaling of all CSS elements using em or rem units.
Arguments
body |
Instance of clog:clog-body denoting the body element of the html page. |
width |
Number denoting the page width in rem units. |
height |
Number denoting the page height in rem units. |
scale |
Number to scale width and height. |
Examples
;; For full HD with 16:9 aspect ratio: (set-page-dimensions body 192 108) ;; For full HD with 8:5 aspect ratio: (set-page-dimensions body 192 120) ;; For Quad HD with 16:9 aspect ratio: (set-page-dimensions body 256 144)