Recent

Author Topic: Draw area from BGRA to BGRA  (Read 13653 times)

circular

  • Hero Member
  • *****
  • Posts: 4471
    • Personal webpage
Re: Draw area from BGRA to BGRA
« Reply #15 on: January 13, 2013, 10:36:13 pm »
Hello bigeno,

I've optimized polygon drawing. I applied the modification you proposed about not adding duplicate points, and also rewrote TBGRAFillInfo : now there is TOnePassFillPolyInfo which is twice as fast.

It's on subversion.
Conscience is the debugger of the mind

bigeno

  • Sr. Member
  • ****
  • Posts: 266
Re: Draw area from BGRA to BGRA
« Reply #16 on: January 14, 2013, 09:43:50 am »
hm, something is wrong with EmptyPoints. I get Range Check Error in bgrafillinfo.pas under TOnePassFillPolyInfo.Create.
Line 1029 with
Code: [Select]
p^.next := @FOnePass[FNext[i]];
//when FNext[i] = -1

when I disable Range Check Error I get AV in bgrapolygon.pas. Line 780
« Last Edit: January 14, 2013, 11:00:52 am by bigeno »

circular

  • Hero Member
  • *****
  • Posts: 4471
    • Personal webpage
Re: Draw area from BGRA to BGRA
« Reply #17 on: January 14, 2013, 01:38:28 pm »
Ok thanks. I've solved the problem. I'm also preparing a benchmark. Please wait.
Conscience is the debugger of the mind

circular

  • Hero Member
  • *****
  • Posts: 4471
    • Personal webpage
Re: Draw area from BGRA to BGRA
« Reply #18 on: January 14, 2013, 02:01:39 pm »
Done. It's updated on subversion. And here is a benchmark :
Conscience is the debugger of the mind

bigeno

  • Sr. Member
  • ****
  • Posts: 266
Re: Draw area from BGRA to BGRA
« Reply #19 on: January 14, 2013, 10:05:49 pm »
Done. It's updated on subversion. And here is a benchmark :
well done ;)
but still ther is a problem with PolygonF. If you draw with bmp.CanvasBGRA.PolygonF(poly,true) instead FillShape then will crash.

circular

  • Hero Member
  • *****
  • Posts: 4471
    • Personal webpage
Re: Draw area from BGRA to BGRA
« Reply #20 on: January 15, 2013, 06:59:45 pm »
Thanks.

Oh well yes I forgot that multishape filler changes the intersection array, so that it must create intersection array if necessary. That should be fixed.

Well spotted  :)
Conscience is the debugger of the mind

 

TinyPortal © 2005-2018