Changeset View
Changeset View
Standalone View
Standalone View
libkwineffects/kwineffects.cpp
Show First 20 Lines • Show All 417 Lines • ▼ Show 20 Line(s) | 417 | { | |||
---|---|---|---|---|---|
418 | return d->screenProjectionMatrix; | 418 | return d->screenProjectionMatrix; | ||
419 | } | 419 | } | ||
420 | 420 | | |||
421 | class ScreenPaintData::Private | 421 | class ScreenPaintData::Private | ||
422 | { | 422 | { | ||
423 | public: | 423 | public: | ||
424 | QMatrix4x4 projectionMatrix; | 424 | QMatrix4x4 projectionMatrix; | ||
425 | QRect outputGeometry; | 425 | QRect outputGeometry; | ||
426 | qreal screenScale; | ||||
426 | }; | 427 | }; | ||
427 | 428 | | |||
428 | ScreenPaintData::ScreenPaintData() | 429 | ScreenPaintData::ScreenPaintData() | ||
429 | : PaintData() | 430 | : PaintData() | ||
430 | , d(new Private()) | 431 | , d(new Private()) | ||
431 | { | 432 | { | ||
432 | } | 433 | } | ||
433 | 434 | | |||
434 | ScreenPaintData::ScreenPaintData(const QMatrix4x4 &projectionMatrix, const QRect &outputGeometry) | 435 | ScreenPaintData::ScreenPaintData(const QMatrix4x4 &projectionMatrix, const QRect &outputGeometry, qreal screenScale) | ||
435 | : PaintData() | 436 | : PaintData() | ||
436 | , d(new Private()) | 437 | , d(new Private()) | ||
437 | { | 438 | { | ||
438 | d->projectionMatrix = projectionMatrix; | 439 | d->projectionMatrix = projectionMatrix; | ||
439 | d->outputGeometry = outputGeometry; | 440 | d->outputGeometry = outputGeometry; | ||
441 | d->screenScale = screenScale; | ||||
440 | } | 442 | } | ||
441 | 443 | | |||
442 | ScreenPaintData::~ScreenPaintData() = default; | 444 | ScreenPaintData::~ScreenPaintData() = default; | ||
443 | 445 | | |||
444 | ScreenPaintData::ScreenPaintData(const ScreenPaintData &other) | 446 | ScreenPaintData::ScreenPaintData(const ScreenPaintData &other) | ||
445 | : PaintData() | 447 | : PaintData() | ||
446 | , d(new Private()) | 448 | , d(new Private()) | ||
447 | { | 449 | { | ||
448 | translate(other.translation()); | 450 | translate(other.translation()); | ||
449 | setXScale(other.xScale()); | 451 | setXScale(other.xScale()); | ||
450 | setYScale(other.yScale()); | 452 | setYScale(other.yScale()); | ||
451 | setZScale(other.zScale()); | 453 | setZScale(other.zScale()); | ||
452 | setRotationOrigin(other.rotationOrigin()); | 454 | setRotationOrigin(other.rotationOrigin()); | ||
453 | setRotationAxis(other.rotationAxis()); | 455 | setRotationAxis(other.rotationAxis()); | ||
454 | setRotationAngle(other.rotationAngle()); | 456 | setRotationAngle(other.rotationAngle()); | ||
455 | d->projectionMatrix = other.d->projectionMatrix; | 457 | d->projectionMatrix = other.d->projectionMatrix; | ||
456 | d->outputGeometry = other.d->outputGeometry; | 458 | d->outputGeometry = other.d->outputGeometry; | ||
459 | d->screenScale = other.d->screenScale; | ||||
457 | } | 460 | } | ||
458 | 461 | | |||
459 | ScreenPaintData &ScreenPaintData::operator=(const ScreenPaintData &rhs) | 462 | ScreenPaintData &ScreenPaintData::operator=(const ScreenPaintData &rhs) | ||
460 | { | 463 | { | ||
461 | setXScale(rhs.xScale()); | 464 | setXScale(rhs.xScale()); | ||
462 | setYScale(rhs.yScale()); | 465 | setYScale(rhs.yScale()); | ||
463 | setZScale(rhs.zScale()); | 466 | setZScale(rhs.zScale()); | ||
464 | setXTranslation(rhs.xTranslation()); | 467 | setXTranslation(rhs.xTranslation()); | ||
465 | setYTranslation(rhs.yTranslation()); | 468 | setYTranslation(rhs.yTranslation()); | ||
466 | setZTranslation(rhs.zTranslation()); | 469 | setZTranslation(rhs.zTranslation()); | ||
467 | setRotationOrigin(rhs.rotationOrigin()); | 470 | setRotationOrigin(rhs.rotationOrigin()); | ||
468 | setRotationAxis(rhs.rotationAxis()); | 471 | setRotationAxis(rhs.rotationAxis()); | ||
469 | setRotationAngle(rhs.rotationAngle()); | 472 | setRotationAngle(rhs.rotationAngle()); | ||
470 | d->projectionMatrix = rhs.d->projectionMatrix; | 473 | d->projectionMatrix = rhs.d->projectionMatrix; | ||
471 | d->outputGeometry = rhs.d->outputGeometry; | 474 | d->outputGeometry = rhs.d->outputGeometry; | ||
475 | d->screenScale = rhs.d->screenScale; | ||||
472 | return *this; | 476 | return *this; | ||
473 | } | 477 | } | ||
474 | 478 | | |||
475 | ScreenPaintData &ScreenPaintData::operator*=(qreal scale) | 479 | ScreenPaintData &ScreenPaintData::operator*=(qreal scale) | ||
476 | { | 480 | { | ||
477 | setXScale(this->xScale() * scale); | 481 | setXScale(this->xScale() * scale); | ||
478 | setYScale(this->yScale() * scale); | 482 | setYScale(this->yScale() * scale); | ||
479 | setZScale(this->zScale() * scale); | 483 | setZScale(this->zScale() * scale); | ||
▲ Show 20 Lines • Show All 41 Lines • ▼ Show 20 Line(s) | 524 | { | |||
521 | return d->projectionMatrix; | 525 | return d->projectionMatrix; | ||
522 | } | 526 | } | ||
523 | 527 | | |||
524 | QRect ScreenPaintData::outputGeometry() const | 528 | QRect ScreenPaintData::outputGeometry() const | ||
525 | { | 529 | { | ||
526 | return d->outputGeometry; | 530 | return d->outputGeometry; | ||
527 | } | 531 | } | ||
528 | 532 | | |||
533 | qreal ScreenPaintData::screenScale() const | ||||
534 | { | ||||
535 | return d->screenScale; | ||||
536 | } | ||||
537 | | ||||
529 | //**************************************** | 538 | //**************************************** | ||
530 | // Effect | 539 | // Effect | ||
531 | //**************************************** | 540 | //**************************************** | ||
532 | 541 | | |||
533 | Effect::Effect() | 542 | Effect::Effect() | ||
534 | { | 543 | { | ||
535 | } | 544 | } | ||
536 | 545 | | |||
▲ Show 20 Lines • Show All 1408 Lines • Show Last 20 Lines |