@@ -95,11 +95,11 @@ Drawable *Face::getRightEye() { return eyeR; }
9595BoundingRect *Face::getBoundingRect () { return boundingRect; }
9696
9797void Face::draw (DrawContext *ctx) {
98+ sprite->createSprite (boundingRect->getWidth (), boundingRect->getHeight ());
9899 sprite->setColorDepth (ctx->getColorDepth ());
99100 // NOTE: setting below for 1-bit color depth
100101 sprite->setBitmapColor (ctx->getColorPalette ()->get (COLOR_PRIMARY ),
101102 ctx->getColorPalette ()->get (COLOR_BACKGROUND ));
102- sprite->createSprite (boundingRect->getWidth (), boundingRect->getHeight ());
103103 if (ctx->getColorDepth () != 1 ) {
104104 sprite->fillSprite (ctx->getColorPalette ()->get (COLOR_BACKGROUND ));
105105 }
@@ -141,10 +141,10 @@ void Face::draw(DrawContext *ctx) {
141141 uint16_t h = boundingRect->getHeight ();
142142 uint16_t tmpSprWidth = _min (w * scale, 320 );
143143 uint16_t tmpSprHeight = _min (h * scale, 240 );
144+ tmpSpr->createSprite (tmpSprWidth, tmpSprHeight);
144145 tmpSpr->setColorDepth (ctx->getColorDepth ());
145146 tmpSpr->setBitmapColor (ctx->getColorPalette ()->get (COLOR_PRIMARY ),
146147 ctx->getColorPalette ()->get (COLOR_BACKGROUND ));
147- tmpSpr->createSprite (tmpSprWidth, tmpSprHeight);
148148 if (ctx->getColorDepth () != 1 ) {
149149 sprite->fillSprite (ctx->getColorPalette ()->get (COLOR_BACKGROUND ));
150150 }
0 commit comments