개정판 025ebf74
issue #923: fixed a problem text control doesn't rotate
Change-Id: I0a45f13948b9aa2966639ec47c48d685afd11c09
KCOM/Controls/AdornerFinal.xaml.cs | ||
---|---|---|
1121 | 1121 |
{ |
1122 | 1122 |
double scale = Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.zoomAndPanControl.ContentScale; |
1123 | 1123 |
var tmp = Mouse.GetPosition(Window.GetWindow((DependencyObject)sender)); |
1124 |
|
|
1125 |
var horzChange = Math.Round(tmp.X - this.CurrentMousePoint.X) / scale; |
|
1126 |
var vertChange = Math.Round(tmp.Y - this.CurrentMousePoint.Y) / scale; |
|
1124 |
|
|
1125 |
var horzChange = (tmp.X - this.CurrentMousePoint.X) / scale;/// Math.Round(tmp.X - this.CurrentMousePoint.X) / scale;
|
|
1126 |
var vertChange = (tmp.Y - this.CurrentMousePoint.Y) / scale;///Math.Round(tmp.Y - this.CurrentMousePoint.Y) / scale;
|
|
1127 | 1127 |
try |
1128 | 1128 |
{ |
1129 | 1129 |
DragThumb.Cursor = Cursors.SizeAll; |
... | ... | |
1215 | 1215 |
case ControlType.TextControl: |
1216 | 1216 |
(member.DrawingData as CommentUserInfo).Angle = AngleValue; |
1217 | 1217 |
|
1218 |
//RectangleGeometry Data = new RectangleGeometry |
|
1219 |
//{ |
|
1220 |
// Rect = new Rect() |
|
1221 |
// { |
|
1222 |
// X = Canvas.GetLeft((member.DrawingData as TextControl)), |
|
1223 |
// Y = Canvas.GetTop((member.DrawingData as TextControl)), |
|
1224 |
// Width = (member.DrawingData as TextControl).Base_TextBlock.ActualWidth / 2, |
|
1225 |
// Height = (member.DrawingData as TextControl).Base_TextBlock.ActualHeight / 2, |
|
1226 |
// } |
|
1227 |
//}; |
|
1228 |
|
|
1229 |
//Point endPointV = new Point(Data.Bounds.Right, Data.Bounds.Bottom); |
|
1230 |
//Point middle = MathSet.getMiddlePoint((member.DrawingData as TextControl).StartPoint, endPointV); |
|
1231 |
|
|
1232 | 1218 |
DragThumb.RenderTransformOrigin = new Point(0, 0); |
1233 | 1219 |
DragThumb.RenderTransform = new RotateTransform() |
1234 | 1220 |
{ |
... | ... | |
1239 | 1225 |
AdornerBorder.RenderTransformOrigin = new Point(0, 0); |
1240 | 1226 |
AdornerBorder.RenderTransform = new RotateTransform() |
1241 | 1227 |
{ |
1242 |
//Angle = (member.DrawingData as TextControl).Angle, |
|
1243 | 1228 |
Angle = (member.DrawingData as CommentUserInfo).Angle |
1244 | 1229 |
}; |
1245 | 1230 |
|
1246 |
//(member.DrawingData as TextControl).Base_Grid.RenderTransform = new RotateTransform() |
|
1247 |
//{ |
|
1248 |
// //Angle = (member.DrawingData as TextControl).Angle, |
|
1249 |
// Angle = (member.DrawingData as CommentUserInfo).Angle |
|
1250 |
//}; |
|
1251 |
|
|
1252 | 1231 |
(member.DrawingData as TextControl).Angle = AngleValue; |
1253 | 1232 |
|
1254 | 1233 |
(member.DrawingData as CommentUserInfo).UpdateControl(); |
내보내기 Unified diff