add python font install
This commit is contained in:
parent
f8a1f32638
commit
e7128c1c22
60 changed files with 836 additions and 1032 deletions
|
|
@ -6,33 +6,34 @@
|
|||
* Used to shield the underlying layers of each master
|
||||
* and enhance portability
|
||||
*----------------
|
||||
* | This version: V2.0
|
||||
* | Date : 2018-11-12
|
||||
* | This version: V2.1
|
||||
* | Date : 2019-03-29
|
||||
* | Info :
|
||||
* 1.Change file name: GUI_BMP.c -> GUI_BMPfile.c
|
||||
* 2.fix: GUI_ReadBmp()
|
||||
* Now Xstart and Xstart can control the position of the picture normally,
|
||||
* and support the display of images of any size. If it is larger than
|
||||
* the actual display range, it will not be displayed.
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documnetation files (the "Software"), to deal
|
||||
# in the Software without restriction, including without limitation the rights
|
||||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
# copies of the Software, and to permit persons to whom the Software is
|
||||
# furished to do so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included in
|
||||
# all copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS OR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
# LIABILITY WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
# THE SOFTWARE.
|
||||
#
|
||||
* 3.fix:line87 &bmprgbquad[i * 4] =》 &bmprgbquad[i]
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documnetation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS OR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
#include "GUI_BMPfile.h"
|
||||
|
|
@ -84,7 +85,8 @@ UBYTE GUI_ReadBmp(const char *path, UWORD Xstart, UWORD Ystart)
|
|||
BMPRGBQUAD bmprgbquad[bmprgbquadsize]; //palette
|
||||
|
||||
for(i = 0; i < bmprgbquadsize; i++){
|
||||
fread(&bmprgbquad[i * 4], sizeof(BMPRGBQUAD), 1, fp);
|
||||
// fread(&bmprgbquad[i * 4], sizeof(BMPRGBQUAD), 1, fp);
|
||||
fread(&bmprgbquad[i], sizeof(BMPRGBQUAD), 1, fp);
|
||||
}
|
||||
if(bmprgbquad[0].rgbBlue == 0xff && bmprgbquad[0].rgbGreen == 0xff && bmprgbquad[0].rgbRed == 0xff){
|
||||
Bcolor = BLACK;
|
||||
|
|
|
|||
|
|
@ -69,6 +69,11 @@
|
|||
|
||||
== How to use ==
|
||||
1, install the Python libraries.
|
||||
sudo apt-get install python-pip
|
||||
sudo pip install RPi.GPIO
|
||||
sudo pip install spidev
|
||||
sudo apt-get install ttf-wqy-zenhei ttf-wqy-microhei
|
||||
|
||||
2, change the current directory to where the demo files located.
|
||||
3, run the demo with:
|
||||
python main.py
|
||||
|
|
|
|||
|
|
@ -69,6 +69,11 @@
|
|||
|
||||
== How to use ==
|
||||
1, install the Python libraries.
|
||||
sudo apt-get install python-pip
|
||||
sudo pip install RPi.GPIO
|
||||
sudo pip install spidev
|
||||
sudo apt-get install ttf-wqy-zenhei ttf-wqy-microhei
|
||||
|
||||
2, change the current directory to where the demo files located.
|
||||
3, run the demo with:
|
||||
python main.py
|
||||
|
|
|
|||
|
|
@ -6,33 +6,34 @@
|
|||
* Used to shield the underlying layers of each master
|
||||
* and enhance portability
|
||||
*----------------
|
||||
* | This version: V2.0
|
||||
* | Date : 2018-11-12
|
||||
* | This version: V2.1
|
||||
* | Date : 2019-03-29
|
||||
* | Info :
|
||||
* 1.Change file name: GUI_BMP.c -> GUI_BMPfile.c
|
||||
* 2.fix: GUI_ReadBmp()
|
||||
* Now Xstart and Xstart can control the position of the picture normally,
|
||||
* and support the display of images of any size. If it is larger than
|
||||
* the actual display range, it will not be displayed.
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documnetation files (the "Software"), to deal
|
||||
# in the Software without restriction, including without limitation the rights
|
||||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
# copies of the Software, and to permit persons to whom the Software is
|
||||
# furished to do so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included in
|
||||
# all copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS OR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
# LIABILITY WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
# THE SOFTWARE.
|
||||
#
|
||||
* 3.fix:line87 &bmprgbquad[i * 4] =》 &bmprgbquad[i]
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documnetation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS OR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
#include "GUI_BMPfile.h"
|
||||
|
|
@ -84,7 +85,8 @@ UBYTE GUI_ReadBmp(const char *path, UWORD Xstart, UWORD Ystart)
|
|||
BMPRGBQUAD bmprgbquad[bmprgbquadsize]; //palette
|
||||
|
||||
for(i = 0; i < bmprgbquadsize; i++){
|
||||
fread(&bmprgbquad[i * 4], sizeof(BMPRGBQUAD), 1, fp);
|
||||
// fread(&bmprgbquad[i * 4], sizeof(BMPRGBQUAD), 1, fp);
|
||||
fread(&bmprgbquad[i], sizeof(BMPRGBQUAD), 1, fp);
|
||||
}
|
||||
if(bmprgbquad[0].rgbBlue == 0xff && bmprgbquad[0].rgbGreen == 0xff && bmprgbquad[0].rgbRed == 0xff){
|
||||
Bcolor = BLACK;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue