このページでは

C

Qul::PlatformInterface::DrawingDevice Class

class Qul::PlatformInterface::DrawingDevice

DrawingDevice クラスは、描画可能なデバイスを定義します。詳細...

Header: #include <platforminterface/drawingdevice.h>
Since: Qt Quick Ultralite (Platform) 1.5

パブリック関数

DrawingDevice(Qul::PixelFormat format, const Qul::PlatformInterface::Size &size, uchar *bits, int32_t bytesPerLine, Qul::PlatformInterface::DrawingEngine *drawingEngine, void *platformContext = NULL)
uchar *bits() const
int32_t bitsPerPixel() const
int32_t bytesPerLine() const
Qul::PlatformInterface::DrawingEngine *drawingEngine() const
Qul::PlatformInterface::DrawingEngine *fallbackDrawingEngine() const
Qul::PixelFormat format() const
int32_t height() const
Qul::PlatformInterface::PixelDataPointer pixelDataAt(Qul::PlatformInterface::Point pos) const
Qul::PlatformInterface::PixelDataPointer pixelDataAt(int32_t x, int32_t y) const
void *platformContext() const
Qul::PlatformInterface::RenderHints renderHints() const
uchar *scanLine(int32_t y) const
void setBits(uchar *bits)
void setBytesPerLine(int32_t bytesPerLine)
void setPlatformContext(void *context)
void setRenderHint(Qul::PlatformInterface::RenderHint hint, bool on = true)
void setSize(Qul::PlatformInterface::Size size)
const Qul::PlatformInterface::Size &size() const
bool testRenderHint(Qul::PlatformInterface::RenderHint hint) const
int32_t width() const

詳細な説明

ペイントエンジンが描画を行うために必要なすべての情報が含まれています。

メンバー関数のドキュメント

DrawingDevice::DrawingDevice(Qul::PixelFormat format, const Qul::PlatformInterface::Size &size, uchar *bits, int32_t bytesPerLine, Qul::PlatformInterface::DrawingEngine *drawingEngine, void *platformContext = NULL)

描画デバイスを構築します。

formatsizebitsbytesPerLineplatformContext 、およびdrawingEngine から、必要な情報をすべて備えた描画デバイスが構築されます。

bits およびdrawingEngine については、所有権を主張しません。

size は空であってはなりません。bytesPerLine は0より大きくなければなりません。bits は、このデバイスのピクセルデータへの有効なポインタでなければなりません。

uchar *DrawingDevice::bits() const

ピクセルデータの開始アドレスを返します。

setBits()も参照してください

int32_t DrawingDevice::bitsPerPixel() const

このデバイスの 1 ピクセルあたりのビット数を返します。この値は、このクラスをインスタンス化する際に指定されたフォーマットによって決定されます。

Qul::PixelFormatも参照してください

int32_t DrawingDevice::bytesPerLine() const

このデバイスの1行あたりのバイト数を返します。

このクラスをインスタンス化する際に、この数値を指定する必要があります。

setBytesPerLine()も参照してください

Qul::PlatformInterface::DrawingEngine *DrawingDevice::drawingEngine() const

このデバイスの描画エンジンを返します。

Qul::PlatformInterface::DrawingEngine *DrawingDevice::fallbackDrawingEngine() const

このデバイスのフォールバック描画エンジンを返します。

Qul::PixelFormat DrawingDevice::format() const

このデバイスのピクセル形式を返します。

int32_t DrawingDevice::height() const

このデバイスの高さを返します。

Qul::PlatformInterface::PixelDataPointer DrawingDevice::pixelDataAt(Qul::PlatformInterface::Point pos) const

指定されたピクセルの開始アドレスを返します。

ピクセルは、以下の座標で指定されます。pos

Qul::PlatformInterface::PixelDataPointer DrawingDevice::pixelDataAt(int32_t x, int32_t y) const

指定されたピクセルの開始アドレスを返します。

ピクセルは、座標x およびy で指定されます。

void *DrawingDevice::platformContext() const

より低レベルのプラットフォームコンテキストオブジェクトへのポインタを返す

グラフィックスデバイスによって beginFrame() が呼び出されると、描画デバイスは低レベルのプラットフォームコンテキストを使用してインスタンス化されます。この関数を使用すると、そのプラットフォームコンテキストを取得できます。このコンテキストは、プラットフォーム固有のデータ型に型キャストすることができます。

setPlatformContext()も参照してください

Qul::PlatformInterface::RenderHints DrawingDevice::renderHints() const

このブレンド処理に必要なレンダリングヒントを指定するフラグを返します。

testRenderHint() および「ハードウェアアクセラレーションによるブレンディングも参照してください

uchar *DrawingDevice::scanLine(int32_t y) const

指定された走査線の開始アドレスを返します。

y 0 からデバイスの高さの範囲内である必要があります。

void DrawingDevice::setBits(uchar *bits)

ピクセルデータの開始アドレスをbits に設定します。

この関数は、切り替えるフレームバッファが複数ある場合に限り、プラットフォームの beginFrame() 関数内からのみ使用してください。

所有権は取得されません。

bits()も参照してください

void DrawingDevice::setBytesPerLine(int32_t bytesPerLine)

デバイスの1行あたりのバイト数をbytesPerLine に設定します。

この関数は、部分フレームバッファ戦略を使用する場合に限り、プラットフォームの beginFrame() 関数内からのみ使用してください。

bytesPerLine()も参照してください

void DrawingDevice::setPlatformContext(void *context)

下位レベルのプラットフォームコンテキストオブジェクトへのポインタをcontext に設定します。

この関数は、プラットフォームがプラットフォームコンテキストを設定するために使用できます。

platformContext()も参照してください

void DrawingDevice::setRenderHint(Qul::PlatformInterface::RenderHint hint, bool on = true)

on がtrueの場合、DrawingEngine に指定されたレンダリングhint を設定します。そうでない場合は、レンダリング をクリアします。

注: レンダリング関数の実行前に呼び出され 、レンダリング処理を誘導するためのヒントを提供します。

void DrawingDevice::setSize(Qul::PlatformInterface::Size size)

デバイスのサイズをsize に設定します。

この関数は、部分フレームバッファ戦略を使用する場合に限り、プラットフォームの `beginFrame()` 関数内からのみ使用してください。

size()も参照してください

const Qul::PlatformInterface::Size &DrawingDevice::size() const

このデバイスのサイズを返します。

setSize()も参照してください

bool DrawingDevice::testRenderHint(Qul::PlatformInterface::RenderHint hint) const

ブレンド処理にhint が必要な場合はtrue を返し、そうでない場合はfalse を返します。

renderHints() および「ハードウェアアクセラレーションによるブレンディングも参照してください

int32_t DrawingDevice::width() const

このデバイスの幅を返します。

特定のQtライセンスの下で利用可能です。
詳細はこちらをご覧ください。