Re: FXPoint

[email protected]
Newsgroups gmane.comp.lib.fox-toolkit.user
Message-ID <[email protected]>
On 2022-06-15 11:52, Marwan L. wrote:
> What I'm confused about is why certain functions, like drawLine accept
> FXint's for the coordinates, while drawLines accept FXPoint which only
> accepts FXshort's
> 

There is no deep mystery: if the coordinates are in a struct, then
we tend to use shorts, esp. if that would make the struct layout-
compatible with underlying drawing APIs.  If they're not in a struct
there would be no gain in using short; parameters are padded to
multiple of 32-bit or passed in registers, so size is immaterial,
for all practical purposes.

On x86-64 the first bunch of integer parameters are always passed
in 64-bit registers, even if the compiler knows them as "short".

At any rate, displays are rarely so large that shorts are limiting
the width or height for drawing purposes.

Internally, some scrollable widgets may be larger; but the part that
gets drawn is always no larger than the display, obviously.

Cheers,

                       -- JVZ
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.