Changeset View
Changeset View
Standalone View
Standalone View
effects/touchpoints/touchpoints.cpp
Show First 20 Lines • Show All 225 Lines • ▼ Show 20 Line(s) | 210 | { | |||
---|---|---|---|---|---|
226 | 226 | | |||
227 | for (int ii = 0; ii < num_segments; ++ii) { | 227 | for (int ii = 0; ii < num_segments; ++ii) { | ||
228 | verts << x + cx << y + cy;//output vertex | 228 | verts << x + cx << y + cy;//output vertex | ||
229 | //apply the rotation matrix | 229 | //apply the rotation matrix | ||
230 | t = x; | 230 | t = x; | ||
231 | x = c * x - s * y; | 231 | x = c * x - s * y; | ||
232 | y = s * t + c * y; | 232 | y = s * t + c * y; | ||
233 | } | 233 | } | ||
234 | vbo->setData(verts.size() / 2, 2, verts.data(), NULL); | 234 | vbo->setData(verts.size() / 2, 2, verts.data(), nullptr); | ||
235 | vbo->render(GL_LINE_LOOP); | 235 | vbo->render(GL_LINE_LOOP); | ||
236 | } | 236 | } | ||
237 | 237 | | |||
238 | void TouchPointsEffect::drawCircleXr(const QColor& color, float cx, float cy, float r) | 238 | void TouchPointsEffect::drawCircleXr(const QColor& color, float cx, float cy, float r) | ||
239 | { | 239 | { | ||
240 | #ifdef KWIN_HAVE_XRENDER_COMPOSITING | 240 | #ifdef KWIN_HAVE_XRENDER_COMPOSITING | ||
241 | if (r <= m_lineWidth) | 241 | if (r <= m_lineWidth) | ||
242 | return; | 242 | return; | ||
▲ Show 20 Lines • Show All 83 Lines • Show Last 20 Lines |