개정판 5beaf28e
issue #10001 Text/Markup 검색에서 angle이 0이 아닌 경우 위치가 안 맞는 문제로 페이지를 0으로 하고 위치를 잡는다.
Change-Id: If7f2467d9d9217e45aa6df0b094db4af6fa81d67
KCOM/Controls/Sample.xaml.cs | ||
---|---|---|
937 | 937 |
|
938 | 938 |
try |
939 | 939 |
{ |
940 |
if(Common.ViewerDataModel.Instance.Angle != 0) |
|
941 |
{ |
|
942 |
for (int i = 0; i < (Common.ViewerDataModel.Instance.Angle / 90); i++) |
|
943 |
{ |
|
944 |
Common.ViewerDataModel.Instance.SystemMain.dzTopMenu.drawingPannelRotate(true); |
|
945 |
} |
|
946 |
|
|
947 |
//Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.rotate.Angle = 0; |
|
948 |
//Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.translate.X = 0; |
|
949 |
//Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.translate.Y = 0; |
|
950 |
} |
|
951 |
|
|
940 | 952 |
Rect rect = commentUserInfo.First().ItemRect; |
941 | 953 |
|
942 | 954 |
foreach (var UserInfo in commentUserInfo) |
943 | 955 |
{ |
944 | 956 |
rect = Rect.Union(rect, UserInfo.ItemRect); |
945 |
|
|
946 | 957 |
} |
947 | 958 |
|
948 | 959 |
SelectionSet.Instance.SelectItemByRect(rect, main); |
949 | 960 |
|
950 | 961 |
var center = new Vector(Common.ViewerDataModel.Instance.ImageViewWidth / 2, Common.ViewerDataModel.Instance.ImageViewHeight / 2); |
951 |
var matrix = MatrixHelper.Rotation(Common.ViewerDataModel.Instance.Angle); |
|
952 |
rect.Transform(matrix); |
|
962 |
//var matrix = MatrixHelper.Rotation(Common.ViewerDataModel.Instance.Angle);
|
|
963 |
//rect.Transform(matrix);
|
|
953 | 964 |
|
954 | 965 |
double scaleX = Common.ViewerDataModel.Instance.ImageViewWidth / rect.Width; |
955 | 966 |
double scaleY = Common.ViewerDataModel.Instance.ImageViewHeight / rect.Height; |
... | ... | |
970 | 981 |
|
971 | 982 |
var pageSize = new Size(main.pageNavigator.CurrentPage.Width, main.pageNavigator.CurrentPage.Height); |
972 | 983 |
|
984 |
double pageAngle = Common.ViewerDataModel.Instance.Angle; |
|
985 |
|
|
986 |
if (pageAngle == 90) |
|
987 |
{ |
|
988 |
pageAngle = 270; |
|
989 |
} |
|
990 |
else |
|
991 |
{ |
|
992 |
pageAngle = 90; |
|
993 |
} |
|
994 |
|
|
973 | 995 |
if ((rect.Size.Width + rect.Size.Height) > (pageSize.Width + pageSize.Height)) |
974 | 996 |
{ |
997 |
var matrix = MatrixHelper.Rotation(Common.ViewerDataModel.Instance.Angle); |
|
998 |
rect.Transform(matrix); |
|
999 |
|
|
975 | 1000 |
main.zoomAndPanControl.ZoomTo(rect); |
976 | 1001 |
} |
977 | 1002 |
else |
978 | 1003 |
{ |
979 | 1004 |
rect.Inflate(rect.Width * 3, rect.Height * 3); |
1005 |
|
|
1006 |
var matrix = MatrixHelper.Rotation(Common.ViewerDataModel.Instance.Angle); |
|
1007 |
rect.Transform(matrix); |
|
1008 |
|
|
1009 |
|
|
980 | 1010 |
main.zoomAndPanControl.ZoomTo(rect); |
981 | 1011 |
} |
982 | 1012 |
} |
내보내기 Unified diff