Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
trouble filling in a closed vector shape
#27
(11-11-2025, 12:51 AM)bplus Wrote:
Code: (Select All)
''   BEST saves dest and optimized with Static a& and alpha colors work better
'2019-12-16 fix by Steve saves some time with STATIC and saves and restores last dest
Sub ftri (x1, y1, x2, y2, x3, y3, K As _Unsigned Long)
    Dim D As Long
    Static a&
    D = _Dest
    If a& = 0 Then a& = _NewImage(1, 1, 32)
    _Dest a&
    _DontBlend a& '  '<<<< new 2019-12-16 fix
    PSet (0, 0), K
    _Blend a& '<<<< new 2019-12-16 fix
    _Dest D
    _MapTriangle _Seamless(0, 0)-(0, 0)-(0, 0), a& To(x1, y1)-(x2, y2)-(x3, y3)
End Sub
I do have a question about this - so it creates a new image in the static variable a& - where is that image ever freed? 
Does QB64PE do that automatically when the program ends?
Reply


Messages In This Thread
RE: trouble filling in a closed vector shape - by madscijr - 11-11-2025, 03:05 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  simple 3d starfield & wireframe or vector graphics revisited madscijr 5 264 01-31-2026, 09:41 PM
Last Post: Pete
  trouble building ansiprint by a740g hsiangch_ong 2 579 01-09-2025, 12:57 AM
Last Post: hsiangch_ong
  Having trouble Windows command line SORT via SHELL GTC 19 4,367 08-26-2023, 04:19 AM
Last Post: GTC
  How do I paint a shape? PhilOfPerth 21 3,922 06-28-2023, 10:09 PM
Last Post: TempodiBasic
Photo Ellipse trouble james2464 14 2,998 08-25-2022, 10:52 PM
Last Post: james2464

Forum Jump:


Users browsing this thread: 1 Guest(s)