SkewTransform クラス

定義

2 次元スキューを表します。

public ref class SkewTransform sealed : Transform
/// [Windows.Foundation.Metadata.Activatable(65536, "Microsoft.UI.Xaml.WinUIContract")]
/// [Windows.Foundation.Metadata.ContractVersion(Microsoft.UI.Xaml.WinUIContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class SkewTransform final : Transform
[Windows.Foundation.Metadata.Activatable(65536, "Microsoft.UI.Xaml.WinUIContract")]
[Windows.Foundation.Metadata.ContractVersion(typeof(Microsoft.UI.Xaml.WinUIContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class SkewTransform : Transform
Public NotInheritable Class SkewTransform
Inherits Transform
<SkewTransform .../>
継承
Object Platform::Object IInspectable DependencyObject GeneralTransform Transform SkewTransform
属性

この例では、SkewTransform を使用してテキストをスキューします。 傾斜 (せん断とも呼ばれます) は、座標空間を不均一な方法でストレッチする変換です。 この例では、2 つのテキスト文字列は、x 座標に沿って -30 度と 30 度傾斜しています。

<Canvas Margin="30">
    <!-- Skew the text using a SkewTransform. -->
    <TextBlock FontSize="32"
               FontWeight="Bold" 
               Foreground="Maroon"
               Text="Skewed Text">
        <TextBlock.RenderTransform>
            <SkewTransform AngleX="-30" AngleY="0" />
        </TextBlock.RenderTransform>
    </TextBlock>

    <TextBlock Canvas.Top="60"
               FontSize="32"
               FontWeight="Bold" 
               Foreground="Maroon"
               Text="Skewed Text">
        <TextBlock.RenderTransform>
            <SkewTransform AngleX="30" AngleY="0" />
        </TextBlock.RenderTransform>
    </TextBlock>
</Canvas>

変換が適用された後、テキストは次のようになります。

スキュー変換が適用されたテキスト

この例では、実行時にコード内の変換にアクセスして変更する方法を示します。 四角形が押されるたびに、スキューが増加します。

<Rectangle PointerPressed="IncreaseSkew"
           Width="50" Height="50" 
           Fill="RoyalBlue">
    <Rectangle.RenderTransform>
        <!-- If you give the transform a name 
             you can access it easily from code. -->
        <SkewTransform x:Name="mySkewTransform" />
    </Rectangle.RenderTransform>
</Rectangle>
public void IncreaseSkew(object sender, RoutedEventArgs e)
{
    mySkewTransform.AngleX = mySkewTransform.AngleX + 5;
}

コンストラクター

SkewTransform()

SkewTransform クラスの新しいインスタンスを初期化します。

プロパティ

AngleX

y 軸から反時計回りに計測した x 軸の傾斜角度を取得または設定します。

AngleXProperty

AngleX 依存関係プロパティを識別します。

AngleY

x 軸から反時計回りに計測した y 軸の傾斜角度を取得または設定します。

AngleYProperty

AngleY 依存関係プロパティを識別します。

CenterX

変換の中心の x 座標を取得または設定します。

CenterXProperty

CenterX 依存関係プロパティを識別します。

CenterY

変換の中心の y 座標を取得または設定します。

CenterYProperty

CenterY 依存関係プロパティを識別します。

Dispatcher

常に Windows アプリ SDK アプリで を返しますnull。 代わりに DispatcherQueue を使用してください。

(継承元 DependencyObject)
DispatcherQueue

このオブジェクトが DispatcherQueue 関連付けられている を取得します。 は DispatcherQueue 、コードが UI 以外のスレッドによって開始された場合でも、UI スレッド上の にアクセス DependencyObject できる機能を表します。

(継承元 DependencyObject)
Inverse

可能であれば、この GeneralTransform の逆変換を取得します。

(継承元 GeneralTransform)
InverseCore

派生またはカスタムの GeneralTransformの戻り値の動作を実装します。

(継承元 GeneralTransform)

メソッド

ClearValue(DependencyProperty)

依存関係プロパティのローカル値をクリアします。

(継承元 DependencyObject)
GetAnimationBaseValue(DependencyProperty)

依存関係プロパティに対して確立された基本値を返します。これは、アニメーションがアクティブでない場合に適用されます。

(継承元 DependencyObject)
GetValue(DependencyProperty)

DependencyObject から依存関係プロパティの現在の有効な値を返します。

(継承元 DependencyObject)
ReadLocalValue(DependencyProperty)

ローカル値が設定されている場合は、依存関係プロパティのローカル値を返します。

(継承元 DependencyObject)
RegisterPropertyChangedCallback(DependencyProperty, DependencyPropertyChangedCallback)

この DependencyObject インスタンスの特定の DependencyProperty に対する変更をリッスンするための通知関数を登録します。

(継承元 DependencyObject)
SetValue(DependencyProperty, Object)

DependencyObject の依存関係プロパティのローカル値を設定します。

(継承元 DependencyObject)
TransformBounds(Rect)

指定された境界ボックスを変換し、それをちょうど格納できる大きさの軸平行境界ボックスを返します。

(継承元 GeneralTransform)
TransformBoundsCore(Rect)

派生変換クラスの TransformBounds 動作をオーバーライドする手段を提供します。

(継承元 GeneralTransform)
TransformPoint(Point)

この変換オブジェクトのロジックを使用して、指定したポイントを変換し、結果を返します。

(継承元 GeneralTransform)
TryTransform(Point, Point)

指定されたポイントの変換を試み、その変換が成功したかどうかを示す値を返します。

(継承元 GeneralTransform)
TryTransformCore(Point, Point)

派生変換クラスの TryTransform 動作をオーバーライドする手段を提供します。

(継承元 GeneralTransform)
UnregisterPropertyChangedCallback(DependencyProperty, Int64)

RegisterPropertyChangedCallback を呼び出して以前に登録した変更通知を取り消します。

(継承元 DependencyObject)

適用対象

こちらもご覧ください