ホーム › UI.Controls › TA_TRANSFORM_OPACITY
TA_TRANSFORM_OPACITY
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| header | TA_TRANSFORM | 20 | +0 | +0 | 基本変換情報(TA_TRANSFORM)。 |
| rOpacity | FLOAT | 4 | +20 | +20 | 目標の不透明度(0.0〜1.0)。 |
| rInitialOpacity | FLOAT | 4 | +24 | +24 | 初期の不透明度(0.0〜1.0)。 |
各言語での定義
#include <windows.h>
// TA_TRANSFORM (x64 20 / x86 20 バイト)
typedef struct TA_TRANSFORM {
TA_TRANSFORM_TYPE eTransformType;
DWORD dwTimingFunctionId;
DWORD dwStartTime;
DWORD dwDurationTime;
TA_TRANSFORM_FLAG eFlags;
} TA_TRANSFORM;
// TA_TRANSFORM_OPACITY (x64 28 / x86 28 バイト)
typedef struct TA_TRANSFORM_OPACITY {
TA_TRANSFORM header;
FLOAT rOpacity;
FLOAT rInitialOpacity;
} TA_TRANSFORM_OPACITY;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct TA_TRANSFORM
{
public int eTransformType;
public uint dwTimingFunctionId;
public uint dwStartTime;
public uint dwDurationTime;
public int eFlags;
}
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct TA_TRANSFORM_OPACITY
{
public TA_TRANSFORM header;
public float rOpacity;
public float rInitialOpacity;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure TA_TRANSFORM
Public eTransformType As Integer
Public dwTimingFunctionId As UInteger
Public dwStartTime As UInteger
Public dwDurationTime As UInteger
Public eFlags As Integer
End Structure
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure TA_TRANSFORM_OPACITY
Public header As TA_TRANSFORM
Public rOpacity As Single
Public rInitialOpacity As Single
End Structureimport ctypes
from ctypes import wintypes
class TA_TRANSFORM(ctypes.Structure):
_fields_ = [
("eTransformType", ctypes.c_int),
("dwTimingFunctionId", wintypes.DWORD),
("dwStartTime", wintypes.DWORD),
("dwDurationTime", wintypes.DWORD),
("eFlags", ctypes.c_int),
]
class TA_TRANSFORM_OPACITY(ctypes.Structure):
_fields_ = [
("header", TA_TRANSFORM),
("rOpacity", ctypes.c_float),
("rInitialOpacity", ctypes.c_float),
]#[repr(C)]
pub struct TA_TRANSFORM {
pub eTransformType: i32,
pub dwTimingFunctionId: u32,
pub dwStartTime: u32,
pub dwDurationTime: u32,
pub eFlags: i32,
}
#[repr(C)]
pub struct TA_TRANSFORM_OPACITY {
pub header: TA_TRANSFORM,
pub rOpacity: f32,
pub rInitialOpacity: f32,
}import "golang.org/x/sys/windows"
type TA_TRANSFORM struct {
eTransformType int32
dwTimingFunctionId uint32
dwStartTime uint32
dwDurationTime uint32
eFlags int32
}
type TA_TRANSFORM_OPACITY struct {
header TA_TRANSFORM
rOpacity float32
rInitialOpacity float32
}type
TA_TRANSFORM = record
eTransformType: Integer;
dwTimingFunctionId: DWORD;
dwStartTime: DWORD;
dwDurationTime: DWORD;
eFlags: Integer;
end;
TA_TRANSFORM_OPACITY = record
header: TA_TRANSFORM;
rOpacity: Single;
rInitialOpacity: Single;
end;const TA_TRANSFORM = extern struct {
eTransformType: i32,
dwTimingFunctionId: u32,
dwStartTime: u32,
dwDurationTime: u32,
eFlags: i32,
};
const TA_TRANSFORM_OPACITY = extern struct {
header: TA_TRANSFORM,
rOpacity: f32,
rInitialOpacity: f32,
};type
TA_TRANSFORM {.bycopy.} = object
eTransformType: int32
dwTimingFunctionId: uint32
dwStartTime: uint32
dwDurationTime: uint32
eFlags: int32
TA_TRANSFORM_OPACITY {.bycopy.} = object
header: TA_TRANSFORM
rOpacity: float32
rInitialOpacity: float32struct TA_TRANSFORM
{
int eTransformType;
uint dwTimingFunctionId;
uint dwStartTime;
uint dwDurationTime;
int eFlags;
}
struct TA_TRANSFORM_OPACITY
{
TA_TRANSFORM header;
float rOpacity;
float rInitialOpacity;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; TA_TRANSFORM_OPACITY サイズ: 28 バイト(x64)
dim st, 7 ; 4byte整数×7(構造体サイズ 28 / 4 切り上げ)
; header : TA_TRANSFORM (+0, 20byte) varptr(st)+0 を基点に操作(20byte:入れ子/配列)
; rOpacity : FLOAT (+20, 4byte) st.5 = 値 / 値 = st.5 (lpoke/lpeek も可)
; rInitialOpacity : FLOAT (+24, 4byte) st.6 = 値 / 値 = st.6 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
; ※GUID・入れ子構造体はデフォルト型でないため、依存する #defstruct を先に定義(下記に同梱)。
#defstruct global TA_TRANSFORM
#field int eTransformType
#field int dwTimingFunctionId
#field int dwStartTime
#field int dwDurationTime
#field int eFlags
#endstruct
#defstruct global TA_TRANSFORM_OPACITY
#field TA_TRANSFORM header
#field float rOpacity
#field float rInitialOpacity
#endstruct
stdim st, TA_TRANSFORM_OPACITY ; NSTRUCT 変数を確保
st->rOpacity = 100
mes "rOpacity=" + st->rOpacity