private getLabelRectangle ( float x, float y, Image image ) : |
||
x | float | |
y | float | |
image | Image | |
return |
RectangleF getLabelRectangle(float x, float y, Image image)
{
if (image == null) return new RectangleF();
RectangleF rect = new RectangleF();
rect.Width = 1.4f * LabelSideLength(image);
rect.Height = LabelSideLength(image);
rect.X = x * image.Width - rect.Width / 2 ;
rect.Y = y * image.Height - rect.Height / 2;
return rect;
//原来的:
//return new RectangleF(x * image.Width, y * image.Height, 1.4f * LabelSideLength(image), LabelSideLength(image));
}
PicView::getLabelRectangle ( float x, float y ) : |