回転パターンの生成
Namespace: fvalgcliAssembly: fvalgcli (in fvalgcli.dll) Version: 3.1.0.0 (3.1.0.11)
Syntax
C# |
---|
public static int fnFIE_gs2_pattern_rotate(
FHANDLE hpattern,
int rot_angle,
int clip_width,
int clip_height,
int rotate_method,
ref FHANDLE rotate_pattern
) |
Visual Basic |
---|
Public Shared Function fnFIE_gs2_pattern_rotate (
hpattern As FHANDLE,
rot_angle As Integer,
clip_width As Integer,
clip_height As Integer,
rotate_method As Integer,
ByRef rotate_pattern As FHANDLE
) As Integer |
Parameters
- hpattern
- Type: fvalgcli..::..FHANDLE
参考にするパターン
- rot_angle
- Type: System..::..Int32
回転角 degreeの10倍値
- clip_width
- Type: System..::..Int32
回転パターン幅の上限
- clip_height
- Type: System..::..Int32
回転パターン高さの上限
- rotate_method
- Type: System..::..Int32
回転の方法
- rotate_pattern
- Type: fvalgcli..::..FHANDLE%
新たに作成する回転済みパターンへのポインタ
Return Value
Type:
Int32
以下のエラーコードを返します。
エラーコード:f_err | 内容 |
---|
F_ERR_NONE | 正常終了 |
F_ERR_NOMEMORY | メモリ不足 |
F_ERR_INVALID_PARAM | 引数異常 |
F_ERR_INVALID_OBJECT | 入力オブジェクト異常 |
F_ERR_INVALID_IMAGE | 入力したパターン内の画像が大きすぎる |
F_ERR_GS_NO_CONTRAST | パタン画像に情報が足りないため、パタンにならない。 (==画像の濃度分散が0.0になる) |
F_ERR_NO_LICENCE | ライセンスエラー、または未初期化エラー |
Remarks
Examples
C# | Copy |
---|
using System;
using System.Collections.Generic;
using System.Text;
using fvalgcli;
namespace TC
{
public partial class FIE
{
public void fnFIE_gs2_pattern_rotate(FHANDLE hPattern)
{
FHANDLE rotate_pattern = FHANDLE.Zero;
try
{
int rot_angle = 10;
int clip_width = 100;
int clip_height = 100;
int rotate_method = 1;
int status = api.fnFIE_gs2_pattern_rotate(hPattern, rot_angle, clip_width, clip_height, rotate_method, ref rotate_pattern);
Assert.IsTrue(status == (int)f_err.F_ERR_NONE, "fnFIE_gs2_pattern_rotate: エラーが発生しました。({0})", (f_err)status);
Console.WriteLine("fnFIE_gs2_pattern_rotate");
api.fnFIE_save_bmp("fnFIE_gs2_pattern_rotate.bmp", rotate_pattern);
}
finally
{
rotate_pattern.Dispose();
}
}
}
} |
Visual Basic | Copy |
---|
Imports System.Collections.Generic
Imports System.Text
Imports fvalgcli
Public Partial Class FIE
Public Sub fnFIE_gs2_pattern_rotate(hPattern As FHANDLE)
Dim rotate_pattern As FHANDLE = FHANDLE.Zero
Try
Dim rot_angle As Integer = 10
Dim clip_width As Integer = 100
Dim clip_height As Integer = 100
Dim rotate_method As Integer = 1
Dim status As Integer = api.fnFIE_gs2_pattern_rotate(hPattern, rot_angle, clip_width, clip_height, rotate_method, rotate_pattern)
Assert.IsTrue(status = CInt(f_err.F_ERR_NONE), "fnFIE_gs2_pattern_rotate: エラーが発生しました。({0})", CType(status, f_err))
Console.WriteLine("fnFIE_gs2_pattern_rotate")
api.fnFIE_save_bmp("fnFIE_gs2_pattern_rotate.bmp", rotate_pattern)
Finally
rotate_pattern.Dispose()
End Try
End Sub
End Class |
See Also