AnonMiraj / fig

FIG (Fortran Intuitive Graphics)
MIT License
27 stars 2 forks source link

fig_draw_pixel #6

Closed johandweber closed 7 months ago

johandweber commented 7 months ago

Hello,

i noted, that the color used in the argument list of fig_draw_pixel is represented by an integer, whereas the colors of all other drawing operations are of type RGB.

I understand that this is very likely done for performance reasons, and I think the subroutine is well implemented, but maybe the name of the subroutine should somehow reflect that it treats colors in a different way.

Yours, Johann

AnonMiraj commented 7 months ago

Oh, that makes sense.

Yes, it was for performance reasons. repeatedly converting color from RGB to integer wouldn't be efficient if it was used in a large subroutine with multiple calls.

Should I change it to something like hex_color or color_i?

I'll also update the name in all the relevant subroutines accordingly. thank you.

johandweber commented 7 months ago

Maybe rename the method to

fig_draw_pixel_i

But this is just a suggestion. I do not have clear preferences.

AnonMiraj commented 7 months ago

okay seems reasonable