Direct2D的 - preserve现有内容和覆盖新价值价值、内容、Direct2D、preserve

由网友(东京的樱花々飘满巴黎)分享简介:我计划建立一个XY绘图仪为我的申请。为了让一些基本的想法,它应该是什么样子(当然的实施将是不同的),请参阅的这里和这里。I am planning to develop a XY Plotter for my application. To give some basic idea, how it should lo...

我计划建立一个XY绘图仪为我的申请。为了让一些基本的想法,它应该是什么样子(当然的实施将是不同的),请参阅的这里和这里。

I am planning to develop a XY Plotter for my application. To give some basic idea, how it should look like (of course the implementation would be different), please refer here and here.

在模拟过程中(我们假设,它需要4小时以完成模拟),在一个固定的X轴,新的Y值应(过)编写的。

During the simulation (let's assume, it takes 4 hours to complete the simulation), on a fixed X axis, the new Y values should be (over)written.

不过,与Direct2D的问题是,每一次 prenderTarget-> BeginDraw()被调用时,现有的绘图(/剧情/位图/图片等)被删除,新的图像正在绘制。因此,我就失去了旧的价值观念。

But, the problem with Direct2D is that, every time pRenderTarget->BeginDraw() is called, the existing Drawing(/Plot/BitMap/Image, etc) is deleted and a new image is being drawn. Therefore I would lose the old values.

,我总能缓冲老Y值在缓冲区/变量,并使用它的下一个图形中。但是,模拟运行4小时,不幸的是我不能保存所有的Y值。这就是为什么,我需要渲染/借鉴现有目标图像/绘制新的Y值的/ etc。

Of course, I can always buffer the old Y values in a buffer/variable and use it in the next drawing. But, the simulation runs for 4 hours and unfortunately I can't afford to save all the Y values. That's why, I need to render/draw the new Y values on the existing target-image/plot/etc.

和,如果不叫 prenderTarget-> EndDraw()在规定时间内一定量,我的应用程序会崩溃,由于资源的限制

And, If don't call pRenderTarget->EndDraw() within a definite amount of time, my application would crash due to resource constraints.

我如何prevent这个问题,并达到要求?

How do I prevent this problem and achieve the requirement?

推荐答案

什么你问的是一个相当复杂的需求 - 这是比看起来更困难! Direct2D的是href="http://msdn.microsoft.com/en-gb/library/windows/desktop/ff684178(v=vs.85).aspx" rel="nofollow">直接模式绘图API的

阅读全文

相关推荐

最新文章