问题描述
我在一个自动滚动设置的面板中有一个picturebox(origBox)。
在origBox上绘制了许多行。稍后,在origBox上绘制图形路径。现在我正在尝试裁剪并将origBox图片框内容(位图)的一部分放大到另一个图片框(cropBox)。裁剪和放大工作,但有一个问题:
我使用矩形来选择origBox的一部分。矩形覆盖直接在origBox上绘制的线条图像和在origBox上绘制的图形路径的一部分。但是,在cropBox上,仅显示选定的行;缺少选定的图形路径部分。
请有人解释为什么会这样吗?图形路径是不是通过复制图片框的一部分(例如origBox)位图来挑选的透明图层吗?
谢谢。
I have a picturebox (origBox) within a panel with auto scroll set on.
A number of lines are drawn on the origBox. Later on a graphics path is drawn on the origBox. Now I am trying to crop and magnify a part of the origBox picturebox contents (bitmap) to another picturebox (cropBox). The cropping and magnification work, but there is a problem:
I use a rectangle to select a part of the origBox. The rectangle covers image of the lines drawn directly on the origBox and part of the graphics path drawn on the origBox. However, on the cropBox, only the selected lines are displayed; the part of graphics path that was selected is missing.
Could anyone, please, explain why this happens? Is graphics path a transparent layer that is not picked by copying a part of a picturebox (eg. origBox) bitmap?
Thanks.
推荐答案
这篇关于使用vb.net 2008图形裁剪(System.Drawing.Drawing2D)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!