Win32 API 日本語リファレンス
ホームMedia.Multimedia › DRAWDIBTIME

DRAWDIBTIME

構造体
サイズx64: 28 バイト / x86: 28 バイト

サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。

フィールド

フィールドサイズx64x86説明
timeCountINT4+0+0計測に含まれた描画回数。平均算出の母数となる。
timeDrawINT4+4+4全体の描画に要した時間。ミリ秒単位で示す。
timeDecompressINT4+8+8展開処理に要した時間。ミリ秒単位で示す。
timeDitherINT4+12+12ディザリング処理に要した時間。ミリ秒単位で示す。
timeStretchINT4+16+16拡大縮小処理に要した時間。ミリ秒単位で示す。
timeBltINT4+20+20ブロック転送(BitBlt)に要した時間。ミリ秒単位で示す。
timeSetDIBitsINT4+24+24SetDIBits呼び出しに要した時間。ミリ秒単位で示す。

各言語での定義

#include <windows.h>

// DRAWDIBTIME  (x64 28 / x86 28 バイト)
typedef struct DRAWDIBTIME {
    INT timeCount;
    INT timeDraw;
    INT timeDecompress;
    INT timeDither;
    INT timeStretch;
    INT timeBlt;
    INT timeSetDIBits;
} DRAWDIBTIME;
using System;
using System.Runtime.InteropServices;

[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct DRAWDIBTIME
{
    public int timeCount;
    public int timeDraw;
    public int timeDecompress;
    public int timeDither;
    public int timeStretch;
    public int timeBlt;
    public int timeSetDIBits;
}
Imports System.Runtime.InteropServices

<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure DRAWDIBTIME
    Public timeCount As Integer
    Public timeDraw As Integer
    Public timeDecompress As Integer
    Public timeDither As Integer
    Public timeStretch As Integer
    Public timeBlt As Integer
    Public timeSetDIBits As Integer
End Structure
import ctypes
from ctypes import wintypes

class DRAWDIBTIME(ctypes.Structure):
    _fields_ = [
        ("timeCount", ctypes.c_int),
        ("timeDraw", ctypes.c_int),
        ("timeDecompress", ctypes.c_int),
        ("timeDither", ctypes.c_int),
        ("timeStretch", ctypes.c_int),
        ("timeBlt", ctypes.c_int),
        ("timeSetDIBits", ctypes.c_int),
    ]
#[repr(C)]
pub struct DRAWDIBTIME {
    pub timeCount: i32,
    pub timeDraw: i32,
    pub timeDecompress: i32,
    pub timeDither: i32,
    pub timeStretch: i32,
    pub timeBlt: i32,
    pub timeSetDIBits: i32,
}
import "golang.org/x/sys/windows"

type DRAWDIBTIME struct {
	timeCount int32
	timeDraw int32
	timeDecompress int32
	timeDither int32
	timeStretch int32
	timeBlt int32
	timeSetDIBits int32
}
type
  DRAWDIBTIME = record
    timeCount: Integer;
    timeDraw: Integer;
    timeDecompress: Integer;
    timeDither: Integer;
    timeStretch: Integer;
    timeBlt: Integer;
    timeSetDIBits: Integer;
  end;
const DRAWDIBTIME = extern struct {
    timeCount: i32,
    timeDraw: i32,
    timeDecompress: i32,
    timeDither: i32,
    timeStretch: i32,
    timeBlt: i32,
    timeSetDIBits: i32,
};
type
  DRAWDIBTIME {.bycopy.} = object
    timeCount: int32
    timeDraw: int32
    timeDecompress: int32
    timeDither: int32
    timeStretch: int32
    timeBlt: int32
    timeSetDIBits: int32
struct DRAWDIBTIME
{
    int timeCount;
    int timeDraw;
    int timeDecompress;
    int timeDither;
    int timeStretch;
    int timeBlt;
    int timeSetDIBits;
}

HSP用 定義

HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。

; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; DRAWDIBTIME サイズ: 28 バイト(x64)
dim st, 7    ; 4byte整数×7(構造体サイズ 28 / 4 切り上げ)
; timeCount : INT (+0, 4byte)  st.0 = 値  /  値 = st.0   (lpoke/lpeek も可)
; timeDraw : INT (+4, 4byte)  st.1 = 値  /  値 = st.1   (lpoke/lpeek も可)
; timeDecompress : INT (+8, 4byte)  st.2 = 値  /  値 = st.2   (lpoke/lpeek も可)
; timeDither : INT (+12, 4byte)  st.3 = 値  /  値 = st.3   (lpoke/lpeek も可)
; timeStretch : INT (+16, 4byte)  st.4 = 値  /  値 = st.4   (lpoke/lpeek も可)
; timeBlt : INT (+20, 4byte)  st.5 = 値  /  値 = st.5   (lpoke/lpeek も可)
; timeSetDIBits : INT (+24, 4byte)  st.6 = 値  /  値 = st.6   (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。
; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global DRAWDIBTIME
    #field int timeCount
    #field int timeDraw
    #field int timeDecompress
    #field int timeDither
    #field int timeStretch
    #field int timeBlt
    #field int timeSetDIBits
#endstruct

stdim st, DRAWDIBTIME        ; NSTRUCT 変数を確保
st->timeCount = 100
mes "timeCount=" + st->timeCount