Author Topic: Draw Square Error Message  (Read 1630 times)

JB

  • Guest
Draw Square Error Message
« on: July 24, 2012, 03:13:05 pm »
Hi, I'm using DrawSquareFill to simulate drawing a line inside  "event=2" in a touch area function. (so swiping simulates drawing)
This works great but after a while, stops working and I get the following message in the debug output:

"drawing too complexDraw error 42 "

Presumably this is something to do with memory?

Is there anyway to avoid this happening / an alternative way to simulate drawing.

Thanks,

Jon

tim

  • Administrator
  • Hero Member
  • *****
  • Posts: 1595
  • Karma: +11/-1
    • View Profile
    • DragonFireSDK
Re: Draw Square Error Message
« Reply #1 on: July 24, 2012, 03:17:43 pm »
There is a limit on how many items can be drawn on a draw surface.  How many things do you need to draw on the surface at any given time?
Tim Sommers
DragonFireSDK Team

JB

  • Guest
Re: Draw Square Error Message
« Reply #2 on: July 24, 2012, 03:34:04 pm »
Hi Tim,
I guess unlimited - depending on what the user wanted to do.  each swipe to a new pixel generates a 2x2 pixel filled square which nicely simulates drawing, but I guess that's 240x160 squares if the entire phone area was to be drawn on!

After about 14 seconds of steady swiping, the error appears.

Not a big problem if can't be avoided, just wondering if there was another way to simulate drawing.

Thanks,

Jon

tim

  • Administrator
  • Hero Member
  • *****
  • Posts: 1595
  • Karma: +11/-1
    • View Profile
    • DragonFireSDK
Re: Draw Square Error Message
« Reply #3 on: July 25, 2012, 10:08:35 am »
You might want to look in to using a bitmap surface instead.  This way, you can simply manipulate every individual pixel and not worry about running out of "draws"...
Tim Sommers
DragonFireSDK Team

JB

  • Guest
Re: Draw Square Error Message
« Reply #4 on: July 26, 2012, 02:38:19 pm »
Great will do.
Thanks