[Documentation]

This commit is contained in:
AghaSaad04 2019-11-17 02:23:52 +05:00
parent fc13f34850
commit 306d6ca6fc
2 changed files with 83 additions and 11 deletions

13
CONTRIBUTING.md Normal file
View File

@ -0,0 +1,13 @@
# Contribution Guidelines
This library is the culmination of the expertise of many members of the open-source community who have dedicated their time and hard work. The best way to ask for help or propose a new idea is to [create a new issue](https://github.com/adafruit/Adafruit-GFX-Library/issues/new) while creating a Pull Request with your code changes allows you to share your own innovations with the rest of the community.
The following are some guidelines to observe when creating issues or PRs:
- Be friendly; it is important that we can all enjoy a safe space as we are all working on the same project and it is okay for people to have different ideas
- [Use code blocks](https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet#code); it helps us help you when we can read your code! On that note also refrain from pasting more than 30 lines of code in a post, instead [create a gist](https://gist.github.com/) if you need to share large snippets
- Use reasonable titles; refrain from using overly long or capitalized titles as they are usually annoying and do little to encourage others to help :smile:
- Be detailed; refrain from mentioning code problems without sharing your source code and always give information regarding your board and version of the library

View File

@ -1,31 +1,90 @@
# Adafruit GFX Library [![Build Status](https://travis-ci.com/adafruit/Adafruit-GFX-Library.svg?branch=master)](https://travis-ci.com/adafruit/Adafruit-GFX-Library)
This is the core graphics library for all our displays, providing a common set of graphics primitives (points, lines, circles, etc.). It needs to be paired with a hardware-specific library for each display device we carry (to handle the lower-level functions).
## Description
Adafruit invests time and resources providing this open source code, please support Adafruit and open-source hardware by purchasing products from Adafruit!
The Adafruit_GFX library for Arduino provides a common syntax and set of graphics primitives (points, lines, circles, etc.). for all of our LCD and OLED displays. This allows Arduino sketches to easily be adapted between display types with minimal fuss…and any new features, performance improvements and bug fixes will immediately apply across our complete offering of color
displays.
Written by Limor Fried/Ladyada for Adafruit Industries.
BSD license, check license.txt for more information.
All text above must be included in any redistribution.
## Installation
Recent Arduino IDE releases include the Library Manager for easy installation. Otherwise, to download, click the DOWNLOAD ZIP button, uncompress and rename the uncompressed folder Adafruit_GFX. Confirm that the Adafruit_GFX folder contains Adafruit_GFX.cpp and Adafruit_GFX.h. Place the Adafruit_GFX library folder your ArduinoSketchFolder/Libraries/ folder. You may need to create the Libraries subfolder if its your first library. Restart the IDE.
### First Method
# Useful Resources
![image](https://user-images.githubusercontent.com/36513474/68398431-89fcf500-0196-11ea-9157-9c95cecc1586.png)
- Image2Code: This is a handy Java GUI utility to convert a BMP file into the array code necessary to display the image with the drawBitmap function. Check out the code at ehubin's GitHub repository: https://github.com/ehubin/Adafruit-GFX-Library/tree/master/Img2Code
1. In the Arduino IDE, navigate to Sketch > Include Library > Manage Libraries
1. Then the Library Manager will open and you will find a list of libraries that are already installed or ready for installation.
1. Then search for gfx graphics using the search bar.
1. Click on the text area and then select the specific version and install it.
- drawXBitmap function: You can use the GIMP photo editor to save a .xbm file and use the array saved in the file to draw a bitmap with the drawXBitmap function. See the pull request here for more details: https://github.com/adafruit/Adafruit-GFX-Library/pull/31
### Second Method
- 'Fonts' folder contains bitmap fonts for use with recent (1.1 and later) Adafruit_GFX. To use a font in your Arduino sketch, \#include the corresponding .h file and pass address of GFXfont struct to setFont(). Pass NULL to revert to 'classic' fixed-space bitmap font.
1. Navigate to the [Releases page](https://github.com/adafruit/Adafruit-GFX-Library/releases).
1. Download the latest release.
1. Extract the zip file
1. In the Arduino IDE, navigate to Sketch > Include Library > Add .ZIP Library
## Features
- ### Lower level funtions
The GFX library handles the lower-level functions of the display devices by pairing with a hardware-specific library for each display device.
- ### Range of colors
The GFX library also handles a range of color TFT displays connected via SPI.
- ### Give back
The library is free, you dont have to pay for anything. However, if you want to support the development, or just thank the author of the library by purchasing products from Adafruit!
Not only youll encourage the development of the library, but youll also learn how to best use the library and probably some C++ too
- ### BSD License
Adafruit_GFX library is open-source and uses one of the most permissive licenses so you can use it on any project.
- Minimal restrictions
- Proprietary use
- Distribution
## Useful Resources
- Image2Code: This is a handy Java GUI utility to convert a BMP file into the array code necessary to display the image with the drawBitmap function. Check out the code at [ehubin's GitHub repository](https://github.com/ehubin/Adafruit-GFX-Library/tree/master/Img2Code)
- drawXBitmap function: You can use the GIMP photo editor to save a .xbm file and use the array saved in the file to draw a bitmap with the drawXBitmap function. See the [pull request](https://github.com/adafruit/Adafruit-GFX-Library/pull/31) here for more details.
- 'Fonts' folder contains bitmap fonts for use with recent (1.1 and later) Adafruit_GFX. To use a font in your Arduino sketch, #include the corresponding .h file and pass the address of GFXfont struct to setFont(). Pass NULL to revert to 'classic' fixed-space bitmap font.
- 'fontconvert' folder contains a command-line tool for converting TTF fonts to Adafruit_GFX header format.
---
### Roadmap
## Roadmap
The PRIME DIRECTIVE is to maintain backward compatibility with existing Arduino sketches -- many are hosted elsewhere and don't track changes here, some are in print and can never be changed! This "little" library has grown organically over time and sometimes we paint ourselves into a design corner and just have to live with it or add ungainly workarounds.
Highly unlikely to merge any changes for additional or incompatible font formats (see Prime Directive above). There are already two formats and the code is quite bloaty there as it is (this also creates liabilities for tools and documentation). If you *must* have a more sophisticated font format, consider creating a fork with the features required for your project. For similar reasons, also unlikely to add any more bitmap formats, it's getting messy.
Please don't reformat code for the sake of reformatting code. The resulting large "visual diff" makes it impossible to untangle actual bug fixes from merely rearranged lines.
## Contributing
If you want to contribute to this project:
- Report bugs and errors
- Ask for enhancements
- Create issues and pull requests
- Tell others about this library
- Contribute new protocols
Please read [CONTRIBUTING.md](https://github.com/adafruit/Adafruit-GFX-Library/blob/master/CONTRIBUTING.md) for details on our code of conduct, and the process for submitting pull requests to us.
## Credits
The library is written and maintained by Limor Fried/Ladyada for Adafruit Industries <info@adafruit.com>.
Other contributors are listed [here](https://github.com/adafruit/Adafruit-GFX-Library/graphs/contributors)
## License
This library is licensed under [BSD license](https://github.com/adafruit/Adafruit-GFX-Library/blob/master/license.txt).