CefSharp49.0.1 SetZoomLevel

SetZoomLevel(double zoomLevel)   -8<= zoomLevel <=9

Each zoom level increases the zoom by 20%. So you get 100%, 120%, 144%, and so on

CefSharp的zoomLevel和通常的percent的转化公式:

1.2^zoomLevel=percent

例:

1.2^(-2.0) = 1.0/1.44 = 69.4%
1.2^2.0 = 1.44 = 144%
1.2^1.0 = 1.2 = 120%
1.2^0 = 1.0 = 100%

代码:

percent=Math.Pow(1.2,zoomLevel)

 

参考:https://www.magpcss.org/ceforum/viewtopic.php?f=6&t=11491(google)

 

posted @ 2019-03-25 19:26  翻白眼的哈士奇  阅读(2481)  评论(0编辑  收藏  举报