Fluent-Qt

API reference

PaintCompat

Public types, functions, and constants declared in this header.

FluentRasterCachePainter

Inherits QPainter

Pixmap sizing, device-pixel-ratio handling, and color components. Explicit bitmap caches retain their requested DPR metadata. Compensate only when the painter ignored a sub-unit DPR; newer Qt already has the right matrix.

Constructors

All inherited Qt members:QPainter

Global

Methods

template <class Device> inline void fluentSetRenderTargetDevicePixelRatio(Device& device, qreal dpr)

Qt 5.15/6.2 clamp a paint device's DPR to 1. Qt effect filters also assume at least unit density. Keep explicit render targets at >= 1 and apply the remaining scale in the painter; allocation and dirty tiles stay unchanged.

inline void fluentApplyRenderTargetScale(QPainter& painter, qreal dpr)

Applies the remaining scale to a normalized explicit render target.

inline qreal fluentPainterDevicePixelRatio(const QPainter& painter)

Effective device pixel ratio for the painter's current paint device.

Types and aliases

using FluentColorComponent = float

QColor::getHsvF / getRgbF / getHslF component pointer type.