Hello Farshad, this code is 6/8 times slower than windows version, The code is a loop reading data from dbf database (Polygons) and painting with gdi+ on a bitmap.
I'm in testing in developing mode, only one session executing.
recs := Lyr.SearchShape(R, moAreaIntersect, Capa.Filtro);
recs.MoveFirst;
ir := 0;
while (not recs.EOF) do
begin
flds := recs.Fields;
shp := IMoPolygon(IDispatch(flds.Item('Shape').Value));
if shp <> nil then
begin
if (Capa.TipoRender <> trnormal)
then render:=Capa.DameRender(flds.Item(Capa.RenderField).ValueAsString)
else Render:=(Capa.DefaultRender);
if Capa.SymbolType=moFillSymbol then
Path := TGPGraphicsPath.Create;
for i := 0 to shp.Parts.Count - 1 do
begin
Points_a_GDI(view,imopoints(shp.Parts.Item(i)),@apoints);
if Capa.SymbolType=moFillSymbol then
Path.AddPolygon(aPoints)
else begin
PintaGDILine(aPoints,Render,Graph);
end;
end;
if Capa.SymbolType=moFillSymbol then
PintaGDIPath(path,Render,Graph,Capa.SymbolType);
end;
recs.MoveNext;
end;
If you think it is strange, I can put the proyect in a virtual machine and send us.
Thanks.