Changeset View
Changeset View
Standalone View
Standalone View
cursors/kpCursorLightCross.cpp
Show First 20 Lines • Show All 66 Lines • ▼ Show 20 Line(s) | 64 | case Black: | |||
---|---|---|---|---|---|
67 | break; | 67 | break; | ||
68 | 68 | | |||
69 | case Transparent: | 69 | case Transparent: | ||
70 | colorValue = ColorWhite; | 70 | colorValue = ColorWhite; | ||
71 | maskValue = MaskTransparent; | 71 | maskValue = MaskTransparent; | ||
72 | break; | 72 | break; | ||
73 | } | 73 | } | ||
74 | 74 | | |||
75 | if (colorValue) | 75 | if (colorValue) { | ||
76 | colorBitmap [y * (width / 8) + (x / 8)] |= (1 << (x % 8)); | 76 | colorBitmap [y * (width / 8) + (x / 8)] |= (1 << (x % 8)); | ||
77 | } | ||||
77 | 78 | | |||
78 | if (maskValue) | 79 | if (maskValue) { | ||
79 | maskBitmap [y * (width / 8) + (x / 8)] |= (1 << (x % 8)); | 80 | maskBitmap [y * (width / 8) + (x / 8)] |= (1 << (x % 8)); | ||
80 | } | 81 | } | ||
82 | } | ||||
81 | 83 | | |||
82 | 84 | | |||
83 | const QCursor *kpCursorLightCrossCreate () | 85 | const QCursor *kpCursorLightCrossCreate () | ||
84 | { | 86 | { | ||
85 | qCDebug(kpLogMisc) << "kpCursorLightCrossCreate() "; | 87 | qCDebug(kpLogMisc) << "kpCursorLightCrossCreate() "; | ||
86 | 88 | | |||
87 | const int side = 24; | 89 | const int side = 24; | ||
88 | const int byteSize = (side * side) / 8; | 90 | const int byteSize = (side * side) / 8; | ||
89 | unsigned char *colorBitmap = new unsigned char [byteSize]; | 91 | auto *colorBitmap = new unsigned char [byteSize]; | ||
90 | unsigned char *maskBitmap = new unsigned char [byteSize]; | 92 | auto *maskBitmap = new unsigned char [byteSize]; | ||
91 | 93 | | |||
92 | memset (colorBitmap, 0, byteSize); | 94 | memset (colorBitmap, 0, byteSize); | ||
93 | memset (maskBitmap, 0, byteSize); | 95 | memset (maskBitmap, 0, byteSize); | ||
94 | 96 | | |||
95 | const int oddSide = side - 1; | 97 | const int oddSide = side - 1; | ||
96 | const int strokeLen = oddSide * 3 / 8; | 98 | const int strokeLen = oddSide * 3 / 8; | ||
97 | 99 | | |||
98 | for (int i = 0; i < strokeLen; i++) | 100 | for (int i = 0; i < strokeLen; i++) | ||
Show All 29 Lines |