From 820e771dafe6fbc5c4cfc02485a864a1a9376525 Mon Sep 17 00:00:00 2001 From: Rohit Gujarathi Date: Mon, 28 Nov 2022 17:47:01 -0800 Subject: [PATCH] Font controlled from example --- examples/Youtube_Stats/Youtube_Stats.ino | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/examples/Youtube_Stats/Youtube_Stats.ino b/examples/Youtube_Stats/Youtube_Stats.ino index 418d61f..16bfa22 100644 --- a/examples/Youtube_Stats/Youtube_Stats.ino +++ b/examples/Youtube_Stats/Youtube_Stats.ino @@ -60,27 +60,28 @@ void setup() #ifdef DESIGN_1 /* Show youtube logo */ Paperdink.epd.drawBitmap(100, 55, youtube_logo, youtube_logo_width, youtube_logo_height, GxEPD_BLACK); - if(Paperdink.epd.epd2.hasColor){ - Paperdink.epd.drawBitmap(100, 55, youtube_logo_red, youtube_logo_width, youtube_logo_height, GxEPD_RED); + if(Paperdink.has_color){ + Paperdink.epd.drawBitmap(100, 55, youtube_logo_red, youtube_logo_width, youtube_logo_height, Paperdink.color); } /* Print name of the channel */ - Paperdink_UI.display_text(Paperdink.epd, 0, 130, YOUTUBE_CHANNEL_NAME, 400, 50, Paperdink_UI.font_med_bold); + Paperdink_UI.display_text_center(Paperdink.epd, 0, 130, YOUTUBE_CHANNEL_NAME, 400, 50, &PAPERDINK_FONT_MED_BOLD); #elif DESIGN_2 /* Show youtube icon */ Paperdink.epd.drawBitmap(50, 60, youtube_icon, youtube_icon_width, youtube_icon_height, GxEPD_BLACK); - if(Paperdink.epd.epd2.hasColor){ - Paperdink.epd.drawBitmap(50, 60, youtube_icon_red, youtube_icon_width, youtube_icon_height, GxEPD_RED); + if(Paperdink.has_color){ + Paperdink.epd.drawBitmap(50, 60, youtube_icon_red, youtube_icon_width, youtube_icon_height, Paperdink.color); } /* Print name of the channel */ - Paperdink_UI.display_text(Paperdink.epd, 170, 65, YOUTUBE_CHANNEL_NAME, 0, 0, Paperdink_UI.font_med_bold); - Paperdink_UI.display_text(Paperdink.epd, 170, 100, DESIGN_2_STRING, 0, 0, Paperdink_UI.font_sml_bold); + Paperdink_UI.display_text_center(Paperdink.epd, 170, 65, YOUTUBE_CHANNEL_NAME, 0, 0, &PAPERDINK_FONT_MED_BOLD); + Paperdink_UI.display_text_center(Paperdink.epd, 170, 100, DESIGN_2_STRING, 0, 0, &PAPERDINK_FONT_SML_BOLD); #endif /* Display number of subscribers and views */ + Paperdink_Youtube.font = &PAPERDINK_FONT_MED; Paperdink_Youtube.display_subscribers_med(Paperdink.epd, 0, 170, 400, 50); Paperdink_Youtube.display_views_med(Paperdink.epd, 0, 220, 400, 50);