From 02af86827411807f0b068a4dcb5362b5f70607cb Mon Sep 17 00:00:00 2001 From: Arthur Date: Fri, 15 May 2020 15:15:27 +0200 Subject: [PATCH] [poincare/sum_layout.cpp] Modified the look of the sigma symbol Change-Id: Ib79414eed96aedacc51b89dce22a14a4e7891cdf --- poincare/src/sum_layout.cpp | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/poincare/src/sum_layout.cpp b/poincare/src/sum_layout.cpp index 74cdee9d2..269f0f267 100644 --- a/poincare/src/sum_layout.cpp +++ b/poincare/src/sum_layout.cpp @@ -10,20 +10,20 @@ namespace Poincare { // Data is stored so that every two line a white pixel must be added. This way the branch's slope is respected constexpr static int k_significantPixelWidth = 6; const uint8_t symbolPixelOneBranch[((SumLayoutNode::k_symbolHeight-1)/2)*k_significantPixelWidth] = { - 0xF1, 0x21, 0xB2, 0xFF, 0xFF, 0xFF, - 0xFF, 0xC5, 0x18, 0xE7, 0xFF, 0xFF, - 0xFF, 0x7F, 0x46, 0xFE, 0xFF, 0xFF, - 0xFF, 0xFC, 0x39, 0x8E, 0xFF, 0xFF, - 0xFF, 0xDF, 0x15, 0xD0, 0xFF, 0xFF, - 0xFF, 0xFF, 0xA4, 0x2A, 0xF6, 0xFF, - 0xFF, 0xFF, 0x5A, 0x69, 0xFF, 0xFF, - 0xFF, 0xFF, 0xF1, 0x21, 0xB2, 0xFF, - 0xFF, 0xFF, 0xC5, 0x18, 0xE7, 0xFF, - 0xFF, 0xFF, 0xFF, 0x7F, 0x46, 0xFE, - 0xFF, 0xFF, 0xFC, 0x3A, 0x8E, 0xFF, - 0xFF, 0xFF, 0xFF, 0xDF, 0x15, 0xD0, - 0xFF, 0xFF, 0xFF, 0xA0, 0x20, 0xF6, - 0xFF, 0xFF, 0XFF, 0xFF, 0xAB, 0x28, + 0xCF, 0x10, 0xDF, 0xFF, 0xFF, 0xFF, + 0xFF, 0x70, 0x4D, 0xFF, 0xFF, 0xFF, + 0xEF, 0x10, 0xBF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xAA, 0x20, 0xFF, 0xFF, 0xFF, + 0xFF, 0x4D, 0x7F, 0xFF, 0xFF, 0xFF, + 0xFF, 0xDF, 0x10, 0xDF, 0xFF, 0xFF, + 0xFF, 0x7F, 0x4D, 0xFF, 0xFF, 0xFF, + 0xFF, 0xEF, 0x20, 0xBF, 0xFF, 0xFF, + 0xFF, 0xAA, 0x20, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0x4D, 0x7F, 0xFF, 0xFF, + 0xFF, 0xDF, 0x20, 0xDF, 0xFF, 0xFF, + 0xFF, 0xFF, 0x7F, 0x4D, 0xFF, 0xFF, + 0xFF, 0xFF, 0x30, 0xBF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xAA, 0x30, 0xFF, 0xFF, }; int SumLayoutNode::serialize(char * buffer, int bufferSize, Preferences::PrintFloatMode floatDisplayMode, int numberOfSignificantDigits) const { @@ -35,10 +35,12 @@ void SumLayoutNode::render(KDContext * ctx, KDPoint p, KDColor expressionColor, uint8_t symbolPixel[k_symbolHeight * k_symbolWidth]; int whiteOffset; - // Taking care of the first line which is a black straight line + // Taking care of the first line which is a black straight line at the exception of the first pixel + symbolPixel[0] = 0x30; for (int j = 0; j < k_symbolWidth; j++) { symbolPixel[j] = 0x00; } + static_assert(k_symbolHeight%2 != 0, "sum_layout : k_symbolHeight is even"); for (int i = 1; i < (k_symbolHeight + 1)/2; i++) { // Adding the white offset