Changeset View
Changeset View
Standalone View
Standalone View
libs/image/kis_paint_device.h
Show First 20 Lines • Show All 520 Lines • ▼ Show 20 Line(s) | 391 | public: | |||
---|---|---|---|---|---|
521 | * the aspect ratio. The width and height of the returned device | 521 | * the aspect ratio. The width and height of the returned device | ||
522 | * won't exceed \p maxw and \p maxw, but they may be smaller. | 522 | * won't exceed \p maxw and \p maxw, but they may be smaller. | ||
523 | * | 523 | * | ||
524 | * @param maxw: maximum width | 524 | * @param maxw: maximum width | ||
525 | * @param maxh: maximum height | 525 | * @param maxh: maximum height | ||
526 | * @param rect: only this rect will be used for the thumbnail | 526 | * @param rect: only this rect will be used for the thumbnail | ||
527 | * | 527 | * | ||
528 | */ | 528 | */ | ||
529 | KisPaintDeviceSP createThumbnailDevice(qint32 w, qint32 h, QRect rect = QRect()) const; | 529 | KisPaintDeviceSP createThumbnailDevice(qint32 w, qint32 h, QRect rect = QRect(), QRect outputRect = QRect()) const; | ||
530 | KisPaintDeviceSP createThumbnailDeviceOversampled(qint32 w, qint32 h, qreal oversample, QRect rect = QRect(), QRect outputRect = QRect()) const; | ||||
530 | 531 | | |||
531 | /** | 532 | /** | ||
532 | * Creates a thumbnail of the paint device, retaining the aspect ratio. | 533 | * Creates a thumbnail of the paint device, retaining the aspect ratio. | ||
533 | * The width and height of the returned QImage won't exceed \p maxw and \p maxw, but they may be smaller. | 534 | * The width and height of the returned QImage won't exceed \p maxw and \p maxw, but they may be smaller. | ||
534 | * The colors are not corrected for display! | 535 | * The colors are not corrected for display! | ||
535 | * | 536 | * | ||
536 | * @param maxw: maximum width | 537 | * @param maxw: maximum width | ||
537 | * @param maxh: maximum height | 538 | * @param maxh: maximum height | ||
538 | * @param rect: only this rect will be used for the thumbnail | 539 | * @param rect: only this rect will be used for the thumbnail | ||
540 | * @param oversample: ratio used for antialiasing | ||||
539 | */ | 541 | */ | ||
540 | QImage createThumbnail(qint32 maxw, qint32 maxh, QRect rect, | 542 | QImage createThumbnail(qint32 maxw, qint32 maxh, QRect rect, qreal oversample = 1, | ||
541 | KoColorConversionTransformation::Intent renderingIntent = KoColorConversionTransformation::internalRenderingIntent(), | 543 | KoColorConversionTransformation::Intent renderingIntent = KoColorConversionTransformation::internalRenderingIntent(), | ||
542 | KoColorConversionTransformation::ConversionFlags conversionFlags = KoColorConversionTransformation::internalConversionFlags()); | 544 | KoColorConversionTransformation::ConversionFlags conversionFlags = KoColorConversionTransformation::internalConversionFlags()); | ||
543 | 545 | | |||
544 | /** | 546 | /** | ||
545 | * Cached version of createThumbnail(qint32 maxw, qint32 maxh, const KisSelection *selection, QRect rect) | 547 | * Cached version of createThumbnail(qint32 maxw, qint32 maxh, const KisSelection *selection, QRect rect) | ||
546 | */ | 548 | */ | ||
547 | QImage createThumbnail(qint32 maxw, qint32 maxh, | 549 | QImage createThumbnail(qint32 maxw, qint32 maxh, qreal oversample = 1, | ||
548 | KoColorConversionTransformation::Intent renderingIntent = KoColorConversionTransformation::internalRenderingIntent(), | 550 | KoColorConversionTransformation::Intent renderingIntent = KoColorConversionTransformation::internalRenderingIntent(), | ||
549 | KoColorConversionTransformation::ConversionFlags conversionFlags = KoColorConversionTransformation::internalConversionFlags()); | 551 | KoColorConversionTransformation::ConversionFlags conversionFlags = KoColorConversionTransformation::internalConversionFlags()); | ||
550 | 552 | | |||
551 | /** | 553 | /** | ||
552 | * Fill c and opacity with the values found at x and y. | 554 | * Fill c and opacity with the values found at x and y. | ||
553 | * | 555 | * | ||
554 | * The color values will be transformed from the profile of | 556 | * The color values will be transformed from the profile of | ||
555 | * this paint device to the display profile. | 557 | * this paint device to the display profile. | ||
▲ Show 20 Lines • Show All 235 Lines • ▼ Show 20 Line(s) | 787 | public: | |||
791 | * because it does a linear scanline search. So the complexity | 793 | * because it does a linear scanline search. So the complexity | ||
792 | * is n*n at worst. | 794 | * is n*n at worst. | ||
793 | * | 795 | * | ||
794 | * \see exactBounds(), nonDefaultPixelArea() | 796 | * \see exactBounds(), nonDefaultPixelArea() | ||
795 | */ | 797 | */ | ||
796 | QRect calculateExactBounds(bool nonDefaultOnly) const; | 798 | QRect calculateExactBounds(bool nonDefaultOnly) const; | ||
797 | 799 | | |||
798 | public: | 800 | public: | ||
799 | struct MemoryReleaseObject : public QObject | 801 | struct MemoryReleaseObject : public QObject { | ||
800 | { | | |||
801 | ~MemoryReleaseObject(); | 802 | ~MemoryReleaseObject(); | ||
802 | }; | 803 | }; | ||
803 | 804 | | |||
804 | static MemoryReleaseObject* createMemoryReleaseObject(); | 805 | static MemoryReleaseObject* createMemoryReleaseObject(); | ||
805 | 806 | | |||
806 | public: | 807 | public: | ||
807 | struct LodDataStruct { | 808 | struct LodDataStruct { | ||
808 | virtual ~LodDataStruct(); | 809 | virtual ~LodDataStruct(); | ||
▲ Show 20 Lines • Show All 41 Lines • Show Last 20 Lines |