Skip to content

Make private layers members protected #162

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Layer_Background.h
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ class SMLayerBackground : public SM_Layer {
void setBrightness(uint8_t brightness);
void enableColorCorrection(bool enabled);

private:
protected:
bool ccEnabled = true;

RGB *currentDrawBufferPtr;
Expand Down
2 changes: 1 addition & 1 deletion src/Layer_BackgroundGfx.h
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ class SMLayerBackgroundGFX : public SM_Layer, public Adafruit_GFX {
using Adafruit_GFX::drawFastVLine;
using Adafruit_GFX::drawFastHLine;

private:
protected:
// Note we'd use a function template for the public functions but are keeping them fixed with rgb24/rgb48 parameters for backwards compatibility
template <typename RGB_OUT>
void fillRefreshRowTemplated(uint16_t hardwareY, RGB_OUT refreshRow[], int brightnessShifts);
Expand Down
2 changes: 1 addition & 1 deletion src/Layer_Gfx_Mono.h
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ class SMLayerGFXMono : public SM_Layer, public Adafruit_GFX {
inline void fillScreen(int color) { fillScreen((rgb1)(color > 0)); };
inline void drawPixel(int16_t x, int16_t y, int color) { drawPixel(x, y, (rgb1)(color > 0)); };

private:
protected:
/* RGB specific */
void handleBufferSwap(void);

Expand Down
2 changes: 1 addition & 1 deletion src/Layer_Indexed.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class SMLayerIndexed : public SM_Layer {
void drawString(int16_t x, int16_t y, uint8_t index, const char text []);
void drawMonoBitmap(int16_t x, int16_t y, uint8_t width, uint8_t height, uint8_t index, uint8_t *bitmap);

private:
protected:
// todo: move somewhere else
static bool getBitmapPixelAtXY(uint8_t x, uint8_t y, uint8_t width, uint8_t height, const uint8_t *bitmap);

Expand Down
2 changes: 1 addition & 1 deletion src/Layer_Indexed_Impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ SMLayerIndexed<RGB, optionFlags>::SMLayerIndexed(uint16_t width, uint16_t height
#ifdef ESP32
assert(indexedBitmap != NULL);
#else
this->assert(indexedBitmap != NULL);
//this->assert(indexedBitmap != NULL);
#endif
memset(indexedBitmap, 0x00, 2 * width * (height / 8));
this->matrixWidth = width;
Expand Down
2 changes: 1 addition & 1 deletion src/Layer_Scrolling.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ class SMLayerScrolling : public SM_Layer {
void setStartOffsetFromLeft(int offset);
void enableColorCorrection(bool enabled);

private:
protected:
void redrawScrollingText(void);
void setMinMax(void);

Expand Down
2 changes: 1 addition & 1 deletion src/Layer_Scrolling_Impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ SMLayerScrolling<RGB, optionFlags>::SMLayerScrolling(uint16_t width, uint16_t he
#ifdef ESP32
assert(scrollingBitmap != NULL);
#else
this->assert(scrollingBitmap != NULL);
//this->assert(scrollingBitmap != NULL);
#endif
memset(scrollingBitmap, 0x00, width * (height / 8));
this->matrixWidth = width;
Expand Down