[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[freetype2-demos] master f7a4fe7: * graph/grfill.c (grFillRect): Thinko.
From: |
Alexei Podtelezhnikov |
Subject: |
[freetype2-demos] master f7a4fe7: * graph/grfill.c (grFillRect): Thinko. |
Date: |
Sun, 13 May 2018 23:40:27 -0400 (EDT) |
branch: master
commit f7a4fe702ccf278cf849d60951b22e939ee51902
Author: Alexei Podtelezhnikov <address@hidden>
Commit: Alexei Podtelezhnikov <address@hidden>
* graph/grfill.c (grFillRect): Thinko.
---
ChangeLog | 4 ++++
graph/grfill.c | 15 +++++++--------
2 files changed, 11 insertions(+), 8 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 4463fd0..b5a7a2f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2018-05-13 Alexei Podtelezhnikov <address@hidden>
+
+ * graph/grfill.c (grFillRect): Thinko.
+
2018-05-10 Alexei Podtelezhnikov <address@hidden>
[ftgrid] Update FT_DEBUG_AUTOFIT mode.
diff --git a/graph/grfill.c b/graph/grfill.c
index 8f5093d..1ab0de5 100644
--- a/graph/grfill.c
+++ b/graph/grfill.c
@@ -263,20 +263,19 @@ grFillRect( grBitmap* target,
switch ( target->mode )
{
case gr_pixel_mode_rgb32:
- size += width;
+ size++;
case gr_pixel_mode_rgb24:
- size += width;
+ size++;
case gr_pixel_mode_rgb565:
case gr_pixel_mode_rgb555:
- size += width;
- case gr_pixel_mode_gray:
- case gr_pixel_mode_pal8:
- size += width;
+ size += 2;
hline_func( line, x, width, color );
- for ( ; --height > 0; line += target->pitch )
- memcpy( line + target->pitch, line, size );
+ for ( line += size * x; --height > 0; line += target->pitch )
+ memcpy( line + target->pitch, line, size * width );
break;
+ case gr_pixel_mode_gray:
+ case gr_pixel_mode_pal8:
case gr_pixel_mode_pal4:
case gr_pixel_mode_mono:
for ( ; height-- > 0; line += target->pitch )
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [freetype2-demos] master f7a4fe7: * graph/grfill.c (grFillRect): Thinko.,
Alexei Podtelezhnikov <=