[fpc-devel] graph module

Evgeniy Ivanov lolkaantimat at gmail.com
Fri Mar 9 16:26:16 CET 2007


On Fri, 09 Mar 2007 18:08:35 +0300, Jonas Maebe  
<jonas.maebe at elis.ugent.be> wrote:




> The graph unit is pretty generic in this respect. You indeed only need  
> to implement putpixel, getpixel, graphics mode detection, setting a  
> graphic mode, setting and getting colour palette entries for indexed  
> modes, and closing down the graphic system again. But it's perfectly  
> possible to also intercept line, elipse, rectangle etc and to implement  
> them directly in the "driver".

So, I may implement only putpixel and etc, but then if I wish I may  
implement line and othe stuff inside my part of code (or somewhere)?


>
> It's the way the whole graphics unit is designed to work. Note that  
> "driver" is just used in the figurative sense here. In practice, you  
> simply write your code and set some procedure variables inside the graph  
> unit so it calls your code.

So will be there different ways of using different back-ends directly from  
graph unit like to have some variables like sdlgraph=1?



>
> If you write your code in C, then you need to write Pascal headers for  
> your code. In the end, you will always have to convert some headers.
>
>
> That's true, and it's the case for most libraries out there. Converting  
> all libraries from C to Pascal rather than the headers would be a huge  
> and never-ending duplication of effort. There's nothing wrong with using  
> Pascal interfaces for libraries which are written in another language.
>

So if I will implement it in C with pascal headers it have a chance to be  
a part of freepascal?



-- 
Best regards
E.I.



More information about the fpc-devel mailing list