Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
TFT_eSPI
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xpstem
TFT_eSPI
Commits
0c49b71d
Unverified
Commit
0c49b71d
authored
Sep 14, 2020
by
Bodmer
Committed by
GitHub
Sep 14, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix #751
parent
d7fdcc09
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
Extensions/Sprite.cpp
Extensions/Sprite.cpp
+4
-4
No files found.
Extensions/Sprite.cpp
View file @
0c49b71d
...
...
@@ -446,7 +446,7 @@ bool TFT_eSprite::pushRotated(int16_t angle, int32_t transp)
int32_t
yt
=
min_y
-
_tft
->
_ypivot
;
uint32_t
xe
=
_dwidth
<<
FP_SCALE
;
uint32_t
ye
=
_dheight
<<
FP_SCALE
;
uint
32
_t
tpcolor
=
transp
;
// convert to unsigned
uint
16
_t
tpcolor
=
transp
;
// convert to unsigned
if
(
_bpp
==
4
)
tpcolor
=
_colorMap
[
transp
&
0x0F
];
tpcolor
=
tpcolor
>>
8
|
tpcolor
<<
8
;
// Working with swapped color bytes
_tft
->
startWrite
();
// Avoid transaction overhead for every tft pixel
...
...
@@ -462,7 +462,7 @@ bool TFT_eSprite::pushRotated(int16_t angle, int32_t transp)
uint32_t
pixel_count
=
0
;
do
{
uint
32
_t
rp
;
uint
16
_t
rp
;
int32_t
xp
=
xs
>>
FP_SCALE
;
int32_t
yp
=
ys
>>
FP_SCALE
;
if
(
_bpp
==
16
)
{
rp
=
_img
[
xp
+
yp
*
_iwidth
];
}
...
...
@@ -517,7 +517,7 @@ bool TFT_eSprite::pushRotated(TFT_eSprite *spr, int16_t angle, int32_t transp)
int32_t
yt
=
min_y
-
spr
->
_yPivot
;
uint32_t
xe
=
_dwidth
<<
FP_SCALE
;
uint32_t
ye
=
_dheight
<<
FP_SCALE
;
uint
32
_t
tpcolor
=
transp
>>
8
|
transp
<<
8
;
// convert to unsigned swapped bytes
uint
16
_t
tpcolor
=
transp
>>
8
|
transp
<<
8
;
// convert to unsigned swapped bytes
bool
oldSwapBytes
=
spr
->
getSwapBytes
();
spr
->
setSwapBytes
(
false
);
...
...
@@ -533,7 +533,7 @@ bool TFT_eSprite::pushRotated(TFT_eSprite *spr, int16_t angle, int32_t transp)
uint32_t
pixel_count
=
0
;
do
{
uint
32
_t
rp
;
uint
16
_t
rp
;
int32_t
xp
=
xs
>>
FP_SCALE
;
int32_t
yp
=
ys
>>
FP_SCALE
;
if
(
_bpp
==
16
)
rp
=
_img
[
xp
+
yp
*
_iwidth
];
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment