通过下面的代码可以取得header的边界:
- Rectangle rRect = new Rectangle(
- (page.Bounds.Location.X - textControl1.ScrollLocation.X) / dpiX,
- (page.Bounds.Location.Y - textControl1.ScrollLocation.Y) / dpiX,
- page.Bounds.Width / dpiX,
- (page.Bounds.Height - page.TextBounds.Height -
- (Math.Abs(page.TextBounds.Bottom - page.Bounds.Bottom))) / dpiX);
复制代码 |