Commit 3d5c7fb1 authored by Alexey.Musinov's avatar Alexey.Musinov

Подсчет ширины повернутого текста.

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@66585 954022d7-b5bf-4e40-9824-e11837661b57
parent af95471d
...@@ -384,12 +384,14 @@ ...@@ -384,12 +384,14 @@
} }
} }
var bound = { dx: dx, dy: dy, x: x, y: y, sx: sx, sw: sw, height: 0 }; var bound = { dx: dx, dy: dy, x: x, y: y, sx: sx, sw: sw, height: 0, width: 0 };
if (angle === 90 || angle === -90) { if (angle === 90 || angle === -90) {
bound.width = tm.height;
bound.height = textW; bound.height = textW;
} else { } else {
bound.height = Math.abs(Math.sin(angle / 180.0 * Math.PI) * textW) + (mul) * tm.height; bound.height = Math.abs(Math.sin(angle / 180.0 * Math.PI) * textW) + (mul) * tm.height;
bound.width = Math.abs(Math.cos(angle / 180.0 * Math.PI) * textW) + Math.abs(Math.sin(angle / 180.0 * Math.PI) * tm.height);
// Делаем кратным 1pt // Делаем кратным 1pt
bound.height = asc_calcnpt(bound.height, 96); bound.height = asc_calcnpt(bound.height, 96);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment