* Create internal pixel buffer. * If a pixel buffer already exists, it will fail. * * @param[in] width Pixel bitmap width in pixels * @param[in] height Pixel bitmap height in pixels * * @return If successful, it will return true otherwise false. */
| 524 | * @return If successful, it will return true otherwise false. |
| 525 | */ |
| 526 | bool create(uint16_t width, uint16_t height) |
| 527 | { |
| 528 | bool isSuccessful = false; |
| 529 | |
| 530 | if (nullptr == m_pixels) |
| 531 | { |
| 532 | m_pixels = allocatePixels(width, height); |
| 533 | |
| 534 | if (nullptr != m_pixels) |
| 535 | { |
| 536 | m_width = width; |
| 537 | m_height = height; |
| 538 | |
| 539 | isSuccessful = true; |
| 540 | } |
| 541 | } |
| 542 | |
| 543 | return isSuccessful; |
| 544 | } |
| 545 | |
| 546 | /** |
| 547 | * Release the internal pixel buffer. |
nothing calls this directly
no outgoing calls
no test coverage detected