保存由两个不同对象绘制的图片框图形 [英] save picturebox graphics drawn by two different objects

查看:74
本文介绍了保存由两个不同对象绘制的图片框图形的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




我有一个带有从不同对象绘制的图形的图片框。在我使用的一个对象中

Hi,

I have a picturebox with graphics drawn from different objects. In one object I used

展开 | 选择 | Wrap | 行号

推荐答案

提示:在编写问题时,工具栏上有一个按钮,用于包装复制/粘贴代码周围的[code]标记。它有助于一堆。它的按钮上有一个''#''。 有关标签的更多信息。他们很酷。 Check''em出来。
TIP: When you are writing your question, there is a button on the tool bar that wraps the [code] tags around your copy/pasted code. It helps a bunch. Its the button with a ''#'' on it. More on tags. They''re cool. Check''em out.


你最大的问题是每个图形都是一个有自己背景的平面位图。如果你合并两个背景将完全覆盖另一个背景。


我想如果一个背景全黑,那就说......

你可以循环遍历它的所有像素,检查它是否不是黑色,并将其复制到另一个图形上。
Your biggest problem is that each graphic is a flat bitmap with its own background. If you merge the two one background will completely overwrite the other.

I suppose if the background of one is all black let''s say...
You could loop through all the pixels of it, check if it is NOT black, and copy it onto the other graphic.


但是图片框正确地显示了图像。有一点我不明白为什么你不能只抓住它在图片框中的现有图像并保存它?
But the picturebox shows the image correctly. One thing i dont understand is why can''t you just grab the existing image that it''s in picturebox and save it?


这篇关于保存由两个不同对象绘制的图片框图形的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆