最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

performance - Increase speed of painting to canvas using FMX framework - Stack Overflow

programmeradmin5浏览0评论

I want to optimize the speed for painting many objects to a canvas using Delphi FMX framework.

How much time is used for the beginscene endscene command execution, and what does this command actually with my canvas. Call once and paint many objects, or call after each object which make my code more simple.

Here is my reference code:

MyCanvas.BeginScene;

MyCanvas.Stroke.Color := clablue;

MyCanvas.Stroke.Kind := TBrushKind.Solid;

MyCanvas.DrawRect(MyRect, 0, 0, AllCorners, 1);

MyCanvas.endscene;

This or a similar code block is called several thousand times for painting my image. Thinking on multithreaded painting to my canvas - is the beginscene endscene the code block, to enable multithread painting inside one canvas?

发布评论

评论列表(0)

  1. 暂无评论