如题,利用GDI+ 画出一幅图像并保存了,如何才能在此保存的图片的基础上继续画图呢,请高手不吝赐教!eg: draw1()
{
Bitmap bitmap(Width,Height);
Graphics graphics(&bitmap);
.............
bitmap.Save(L"test.bmp", &Clsid,NULL);
} draw2()
{
Bitmap bitmap(Width,Height);
Graphics graphics(&bitmap);
.............
bitmap.Save(L"test.bmp", &Clsid,NULL);
}
如上 draw1(),draw2()为分别绘图并分别保存的图片,我现在想实现的结果是如何把draw2()方法里绘图结果添加到draw1()方法保存的图片上!
{
Bitmap bitmap(Width,Height);
Graphics graphics(&bitmap);
.............
bitmap.Save(L"test.bmp", &Clsid,NULL);
} draw2()
{
Bitmap bitmap(Width,Height);
Graphics graphics(&bitmap);
.............
bitmap.Save(L"test.bmp", &Clsid,NULL);
}
如上 draw1(),draw2()为分别绘图并分别保存的图片,我现在想实现的结果是如何把draw2()方法里绘图结果添加到draw1()方法保存的图片上!
解决方案 »
- 求助:如何判断一个程序(比如记事本),是由用户双击打开的,还是由其它程序调用SHELL打开的呢?
- 第一次发帖提问:书上小型聊天程序,编译出现的6d个错误
- 启动子线程后窗口刷新的问题
- 询问,domain name 的问题
- 8好意思,没分了。CComboBox加了项目,为什么点箭头列表不显示出来?
- 请教,急盼回复!!
- 一个小问题...(在线等,答者有分!!)
- 是学DELPHI C++还是MICROSOFT VC++?
- 怎么不让窗体和控件得到焦点(输入法中的虚键盘),怎么实现
- 谁知道在VC中EXCEL工作表的类型xlWorksheet到底是几?
- HeapAlloc和malloc是工作在一个层次上面么? 到底有什么不同的地方?
- CDaoWorkspace::RepairDatabase用法
可以是HWND,HCD,而且也可以是一个Bitmap,
先用一个Bitmap打开你Dra
然后绑定一个Graphics
然后这个Graphics所有的绘制动作都是在Bitmap上了
Graphics gra(&bit);
gra.drawline(xxxx);
这就是想当于在陈老师的作品中画线
在我的例子中是不是可以这样理解调用的哈:draw1()
{
Bitmap bitmap(Width,Height);
Graphics graphics(&bitmap);
.............
bitmap.Save(L"test.bmp", &Clsid,NULL);
} draw2()
{
Bitmap bitmap(L"test.bmp");
Graphics graphics(&bitmap);
.............
bitmap.Save(L"test.bmp", &Clsid,NULL);
}