← Back to team overview

kicad-developers team mailing list archive

Re: GAL edit merges

 

On 11/04/2011 04:19 PM, Torsten Hüter wrote:
> Hi Dick,
>
> On 04.11.2011 18:38, Dick Hollenbeck wrote:
>> Hi Torsten,
>>
>> Some concerns about GAL:
>>
>> 1) what would be the cost of doing OPENGL_GAL::DrawGrid()
>> using the GAL API itself?  (This would be better "self promotion", than using the opengl
>> API, or cairo API, and would let this function be moved up into GAL itself.)
> I believe I've implemented it this way, because I draw the lines in 
> screen coordinates and I can use faster drawing methods rather than 
> using the universal DrawLine(..) method. But I'll check if that could be 
> unified for Cairo/OpenGL.

Just measuring the cost might be helpful.  It might point out costs that would be incurred
by application code using the GAL API under similar circumstances.

Or it might lead to an understanding of a possible improvement in the mapping from your
API into the implementation.


:
>> > I have yet to find this separation 2) in the GAL
:
>> You can do this already with the group methods.
>>
>> BeginGroup() starts a new group, EndGroup() finishes the group - and you 
>> can simply draw the recorded graphics elements with DrawGroup().
>> For OpenGL basically a display list is created; for Cairo I'm using a 
>> deque and a simple state machine (later Cairo versions have now already 
>> a group function, I'll use that in the next versions).
>>
>> Have a look at the group example in the test folder.

Thanks.  That looks promising.

Dick




References