ASE Home Page Products Download Purchase Support About ASE
ChartDirector General
Forum HomeForum Home   SearchSearch

Message ListMessage List     Post MessagePost Message

  Colour Handles
Posted by Chris Tonks on Jul-11-2013 17:57
Hi Mr Kwan,

I continue to be impressed with ChartDirector. I've been using Chart::metalColor for a while now to make subtly varied gridlines, and I was delighted to discover I could actually pass a colour generated by Chart::metalColor into BaseChart::dashLineColor to get a colour combining the two effects. Clever stuff!

But I'm curious about the handles these functions return. Are they some sort of integer code that ChartDirector uses to reproduce the colour every time they're used, or are they pointers to a colour object of some kind that's been created on the heap? I ask because the documentation makes no mention (that I can see) of deleting such an object.

Regards,

- Chris Tonks

  Re: Colour Handles
Posted by Peter Kwan on Jul-11-2013 21:00
Hi Chris,

The color is an integer handle. That handle is valid only on the BaseChart object that creates the handle. You cannot and should not delete it. When the BaseChart object is deleted, any memory required to support that handle will be freed.

Regards
Peter Kwan