gds_draw_ext.c 742 B

12345678910111213141516171819202122
  1. /**
  2. * Copyright (c) 2017-2018 Tara Keeling
  3. * 2020 Philippe G.
  4. *
  5. * This software is released under the MIT License.
  6. * https://opensource.org/licenses/MIT
  7. */
  8. #include "gds_private.h"
  9. #include "gds.h"
  10. #include "gds_draw.h"
  11. void IRAM_ATTR GDS_DrawPixelExt( struct GDS_Device* Device, int X, int Y, int Color ){
  12. if ( IsPixelVisible( Device, X, Y ) == true ) {
  13. GDS_DrawPixelFast( Device, X, Y, Color );
  14. }
  15. }
  16. void IRAM_ATTR GDS_DrawPixelFastExt( struct GDS_Device* Device, int X, int Y, int Color ){
  17. if (Device->DrawPixelFast) Device->DrawPixelFast( Device, X, Y, Color );
  18. else if (Device->Depth == 4) GDS_DrawPixel4Fast( Device, X, Y, Color);
  19. else if (Device->Depth == 1) GDS_DrawPixel1Fast( Device, X, Y, Color);
  20. }