| 93 | } |
| 94 | |
| 95 | SDL_Cursor* CursorRepository::Create(const CursorData* cursorInfo, uint8_t scale) |
| 96 | { |
| 97 | const auto integer_scale = static_cast<int>(round(scale)); |
| 98 | |
| 99 | auto data = ScaleDataArray(cursorInfo->Data, kCursorBitWidth, kCursorHeight, static_cast<size_t>(integer_scale)); |
| 100 | auto mask = ScaleDataArray(cursorInfo->Mask, kCursorBitWidth, kCursorHeight, static_cast<size_t>(integer_scale)); |
| 101 | |
| 102 | auto* cursor = SDL_CreateCursor( |
| 103 | data.data(), mask.data(), kBaseCursorWidth * integer_scale, kBaseCursorHeight * integer_scale, |
| 104 | cursorInfo->HotSpot.X * integer_scale, cursorInfo->HotSpot.Y * integer_scale); |
| 105 | |
| 106 | return cursor; |
| 107 | } |
| 108 | |
| 109 | void CursorRepository::SetCursorScale(uint8_t cursorScale) |
| 110 | { |
no test coverage detected