コード例 #1
0
ファイル: DrawElements.cpp プロジェクト: johndpope/UE4
void FSlateDrawElement::MakeDebugQuad( FSlateWindowElementList& ElementList, uint32 InLayer, const FPaintGeometry& PaintGeometry, const FSlateRect& InClippingRect)
{
	PaintGeometry.CommitTransformsIfUsingLegacyConstructor();
	FSlateDrawElement& DrawElt = ElementList.AddUninitialized();
	DrawElt.Init(InLayer, PaintGeometry, InClippingRect, ESlateDrawEffect::None);
	DrawElt.ElementType = ET_DebugQuad;
}
コード例 #2
0
ファイル: DrawElements.cpp プロジェクト: johndpope/UE4
void FSlateDrawElement::MakeSpline( FSlateWindowElementList& ElementList, uint32 InLayer, const FPaintGeometry& PaintGeometry, const FVector2D& InStart, const FVector2D& InStartDir, const FVector2D& InEnd, const FVector2D& InEndDir, const FSlateRect InClippingRect, float InThickness, ESlateDrawEffect::Type InDrawEffects, const FLinearColor& InTint )
{
	PaintGeometry.CommitTransformsIfUsingLegacyConstructor();
	FSlateDrawElement& DrawElt = ElementList.AddUninitialized();
	DrawElt.Init(InLayer, PaintGeometry, InClippingRect, InDrawEffects);
	DrawElt.ElementType = ET_Spline;
	DrawElt.DataPayload.SetSplinePayloadProperties( InStart, InStartDir, InEnd, InEndDir, InThickness, InTint );
}
コード例 #3
0
ファイル: DrawElements.cpp プロジェクト: johndpope/UE4
void FSlateDrawElement::MakeGradient( FSlateWindowElementList& ElementList, uint32 InLayer, const FPaintGeometry& PaintGeometry, TArray<FSlateGradientStop> InGradientStops, EOrientation InGradientType, const FSlateRect& InClippingRect, ESlateDrawEffect::Type InDrawEffects, bool bGammaCorrect )
{
	PaintGeometry.CommitTransformsIfUsingLegacyConstructor();
	FSlateDrawElement& DrawElt = ElementList.AddUninitialized();
	DrawElt.Init(InLayer, PaintGeometry, InClippingRect, InDrawEffects);
	DrawElt.ElementType = ET_Gradient;
	DrawElt.DataPayload.SetGradientPayloadProperties( InGradientStops, InGradientType, bGammaCorrect );
}
コード例 #4
0
ファイル: DrawElements.cpp プロジェクト: johndpope/UE4
void FSlateDrawElement::MakeText( FSlateWindowElementList& ElementList, uint32 InLayer, const FPaintGeometry& PaintGeometry, const FText& InText, const FSlateFontInfo& InFontInfo, const FSlateRect& InClippingRect,ESlateDrawEffect::Type InDrawEffects, const FLinearColor& InTint )
{
	PaintGeometry.CommitTransformsIfUsingLegacyConstructor();
	FSlateDrawElement& DrawElt = ElementList.AddUninitialized();
	DrawElt.Init(InLayer, PaintGeometry, InClippingRect, InDrawEffects);
	DrawElt.ElementType = ET_Text;
	DrawElt.DataPayload.SetTextPayloadProperties( InText.ToString(), InFontInfo, InTint );
}
コード例 #5
0
ファイル: DrawElements.cpp プロジェクト: johndpope/UE4
void FSlateDrawElement::MakeCustom( FSlateWindowElementList& ElementList, uint32 InLayer, TSharedPtr<ICustomSlateElement, ESPMode::ThreadSafe> CustomDrawer )
{
	FSlateDrawElement& DrawElt = ElementList.AddUninitialized();
	DrawElt.Init(InLayer, FPaintGeometry(), FSlateRect(1,1,1,1), ESlateDrawEffect::None);
	DrawElt.RenderTransform = FSlateRenderTransform();
	DrawElt.ElementType = ET_Custom;
	DrawElt.DataPayload.SetCustomDrawerPayloadProperties( CustomDrawer );
}
コード例 #6
0
ファイル: DrawElements.cpp プロジェクト: johndpope/UE4
void FSlateDrawElement::MakeLines( FSlateWindowElementList& ElementList, uint32 InLayer, const FPaintGeometry& PaintGeometry, const TArray<FVector2D>& Points, const FSlateRect InClippingRect, ESlateDrawEffect::Type InDrawEffects, const FLinearColor& InTint, bool bAntialias )
{
	PaintGeometry.CommitTransformsIfUsingLegacyConstructor();
	FSlateDrawElement& DrawElt = ElementList.AddUninitialized();
	DrawElt.Init(InLayer, PaintGeometry, InClippingRect, InDrawEffects);
	DrawElt.ElementType = ET_Line;
	DrawElt.DataPayload.SetLinesPayloadProperties( Points, InTint, bAntialias, ESlateLineJoinType::Sharp );
}
コード例 #7
0
ファイル: DrawElements.cpp プロジェクト: johndpope/UE4
void FSlateDrawElement::MakeViewport( FSlateWindowElementList& ElementList, uint32 InLayer, const FPaintGeometry& PaintGeometry, TSharedPtr<const ISlateViewport> Viewport, const FSlateRect& InClippingRect, bool bGammaCorrect, bool bAllowBlending, ESlateDrawEffect::Type InDrawEffects, const FLinearColor& InTint )
{
	PaintGeometry.CommitTransformsIfUsingLegacyConstructor();
	FSlateDrawElement& DrawElt = ElementList.AddUninitialized();
	DrawElt.Init(InLayer, PaintGeometry, InClippingRect, InDrawEffects);
	DrawElt.ElementType = ET_Viewport;
	DrawElt.DataPayload.SetViewportPayloadProperties( Viewport, InTint, bGammaCorrect, bAllowBlending );
}
コード例 #8
0
void FSlateDrawElement::MakeCustom( FSlateWindowElementList& ElementList, uint32 InLayer, TSharedPtr<ICustomSlateElement, ESPMode::ThreadSafe> CustomDrawer )
{
	FSlateDrawElement& DrawElt = ElementList.AddUninitialized();
	DrawElt.ElementType = ET_Custom;
	DrawElt.Layer = InLayer;
	DrawElt.DataPayload.SetCustomDrawerPayloadProperties( CustomDrawer );
	DrawElt.ClippingRect = FSlateRect(1,1,1,1);
}
コード例 #9
0
void FSlateDrawElement::MakeLines( FSlateWindowElementList& ElementList, uint32 InLayer, const FPaintGeometry& PaintGeometry, const TArray<FVector2D>& Points, const FSlateRect InClippingRect, ESlateDrawEffect::Type InDrawEffects, const FLinearColor& InTint, bool bAntialias )
{
	FSlateDrawElement& DrawElt = ElementList.AddUninitialized();
	DrawElt.ElementType = ET_Line;
	DrawElt.Position = PaintGeometry.DrawPosition;
	DrawElt.ClippingRect = InClippingRect;
	DrawElt.DataPayload.SetLinesPayloadProperties( Points, InTint, bAntialias, ESlateLineJoinType::Sharp );
	DrawElt.Layer = InLayer;
	DrawElt.DrawEffects = InDrawEffects;
	DrawElt.Scale = PaintGeometry.DrawScale;
}
コード例 #10
0
void FSlateDrawElement::MakeSpline( FSlateWindowElementList& ElementList, uint32 InLayer, const FPaintGeometry& PaintGeometry, const FVector2D& InStart, const FVector2D& InStartDir, const FVector2D& InEnd, const FVector2D& InEndDir, const FSlateRect InClippingRect, float InThickness, ESlateDrawEffect::Type InDrawEffects, const FLinearColor& InTint )
{
	FSlateDrawElement& DrawElt = ElementList.AddUninitialized();
	DrawElt.ElementType = ET_Spline;
	DrawElt.Position = PaintGeometry.DrawPosition;
	DrawElt.ClippingRect = InClippingRect;
	DrawElt.DataPayload.SetSplinePayloadProperties( InStart, InStartDir, InEnd, InEndDir, InThickness, InTint );
	DrawElt.Layer = InLayer;
	DrawElt.DrawEffects = InDrawEffects;
	DrawElt.Scale = PaintGeometry.DrawScale;
}
コード例 #11
0
void FSlateDrawElement::MakeDebugQuad( FSlateWindowElementList& ElementList, uint32 InLayer, const FPaintGeometry& PaintGeometry, const FSlateRect& InClippingRect)
{
	FSlateDrawElement& DrawElt = ElementList.AddUninitialized();
	DrawElt.ElementType = ET_DebugQuad;
	DrawElt.Position = PaintGeometry.DrawPosition;
	DrawElt.Size = PaintGeometry.DrawSize;
	DrawElt.ClippingRect = InClippingRect;
	DrawElt.Layer = InLayer;
	DrawElt.DrawEffects = ESlateDrawEffect::None;
	DrawElt.Scale = PaintGeometry.DrawScale;
}
コード例 #12
0
void FSlateDrawElement::MakeGradient( FSlateWindowElementList& ElementList, uint32 InLayer, const FPaintGeometry& InPaintGeometry, TArray<FSlateGradientStop> InGradientStops, EOrientation InGradientType, const FSlateRect& InClippingRect, ESlateDrawEffect::Type InDrawEffects, bool bGammaCorrect )
{
	FSlateDrawElement& DrawElt = ElementList.AddUninitialized();
	DrawElt.ElementType = ET_Gradient;
	DrawElt.Position = InPaintGeometry.DrawPosition;
	DrawElt.Size = InPaintGeometry.DrawSize;
	DrawElt.ClippingRect = InClippingRect;
	DrawElt.DataPayload.SetGradientPayloadProperties( InGradientStops, InGradientType, bGammaCorrect );
	DrawElt.Layer = InLayer;
	DrawElt.DrawEffects = InDrawEffects;
	DrawElt.Scale = InPaintGeometry.DrawScale;
}
コード例 #13
0
void FSlateDrawElement::MakeText( FSlateWindowElementList& ElementList, uint32 InLayer, const FPaintGeometry& PaintGeometry, const FText& InText, const FSlateFontInfo& InFontInfo, const FSlateRect& InClippingRect,ESlateDrawEffect::Type InDrawEffects, const FLinearColor& InTint )
{
	FSlateDrawElement& DrawElt = ElementList.AddUninitialized();
	DrawElt.ElementType = ET_Text;
	DrawElt.Position = PaintGeometry.DrawPosition;
	DrawElt.Size = PaintGeometry.DrawSize;
	DrawElt.ClippingRect = InClippingRect;
	DrawElt.DataPayload.SetTextPayloadProperties( InText.ToString(), InFontInfo, InTint );
	DrawElt.Layer = InLayer;
	DrawElt.DrawEffects = InDrawEffects;
	DrawElt.Scale = PaintGeometry.DrawScale;
}
コード例 #14
0
void FSlateDrawElement::MakeViewport( FSlateWindowElementList& ElementList, uint32 InLayer, const FPaintGeometry& PaintGeometry, TSharedPtr<const ISlateViewport> Viewport, const FSlateRect& InClippingRect, bool bGammaCorrect, bool bAllowBlending, ESlateDrawEffect::Type InDrawEffects, const FLinearColor& InTint )
{
	FSlateDrawElement& DrawElt = ElementList.AddUninitialized();
	DrawElt.ElementType = ET_Viewport;
	DrawElt.Position = PaintGeometry.DrawPosition;
	DrawElt.Size = PaintGeometry.DrawSize;
	DrawElt.ClippingRect = InClippingRect;
	DrawElt.DataPayload.SetViewportPayloadProperties( Viewport, InTint, bGammaCorrect, bAllowBlending );
	DrawElt.Layer = InLayer;
	DrawElt.DrawEffects = InDrawEffects;
	DrawElt.Scale = PaintGeometry.DrawScale;
}
コード例 #15
0
ファイル: DrawElements.cpp プロジェクト: johndpope/UE4
void FSlateDrawElement::MakeBox( 
	FSlateWindowElementList& ElementList,
	uint32 InLayer, 
	const FPaintGeometry& PaintGeometry, 
	const FSlateBrush* InBrush, 
	const FSlateRect& InClippingRect, 
	ESlateDrawEffect::Type InDrawEffects, 
	const FLinearColor& InTint )
{
	PaintGeometry.CommitTransformsIfUsingLegacyConstructor();
	FSlateDrawElement& DrawElt = ElementList.AddUninitialized();
	DrawElt.Init(InLayer, PaintGeometry, InClippingRect, InDrawEffects);
	DrawElt.ElementType = (InBrush->DrawAs == ESlateBrushDrawType::Border) ? ET_Border : ET_Box;
	DrawElt.DataPayload.SetBoxPayloadProperties( InBrush, InTint );
}
コード例 #16
0
void FSlateDrawElement::MakeBox( 
	FSlateWindowElementList& ElementList,
	uint32 InLayer, 
	const FPaintGeometry& PaintGeometry, 
	const FSlateBrush* InBrush, 
	const FSlateRect& InClippingRect, 
	ESlateDrawEffect::Type InDrawEffects, 
	const FLinearColor& InTint )
{
	FSlateDrawElement& DrawElt = ElementList.AddUninitialized();
	DrawElt.ElementType = (InBrush->DrawAs == ESlateBrushDrawType::Border) ? ET_Border : ET_Box;
	DrawElt.Position = PaintGeometry.DrawPosition;
	DrawElt.Size = PaintGeometry.DrawSize;
	DrawElt.ClippingRect = InClippingRect;
	DrawElt.DataPayload.SetBoxPayloadProperties( InBrush, InTint );
	DrawElt.Layer = InLayer;
	DrawElt.DrawEffects = InDrawEffects;
	DrawElt.Scale = PaintGeometry.DrawScale;
}
コード例 #17
0
ファイル: DrawElements.cpp プロジェクト: johndpope/UE4
void FSlateDrawElement::MakeRotatedBox( 
	FSlateWindowElementList& ElementList,
	uint32 InLayer, 
	const FPaintGeometry& PaintGeometry, 
	const FSlateBrush* InBrush, 
	const FSlateRect& InClippingRect, 
	ESlateDrawEffect::Type InDrawEffects, 
	float Angle,
	TOptional<FVector2D> InRotationPoint,
	ERotationSpace RotationSpace,
	const FLinearColor& InTint )
{
	PaintGeometry.CommitTransformsIfUsingLegacyConstructor();
	FSlateDrawElement& DrawElt = ElementList.AddUninitialized();
	DrawElt.Init(InLayer, PaintGeometry, InClippingRect, InDrawEffects);
	DrawElt.ElementType = (InBrush->DrawAs == ESlateBrushDrawType::Border) ? ET_Border : ET_Box;

	FVector2D RotationPoint = GetRotationPoint( PaintGeometry, InRotationPoint, RotationSpace );
	DrawElt.DataPayload.SetRotatedBoxPayloadProperties( InBrush, Angle, RotationPoint, InTint );
}
コード例 #18
0
void FSlateDrawElement::MakeRotatedBox( 
	FSlateWindowElementList& ElementList,
	uint32 InLayer, 
	const FPaintGeometry& PaintGeometry, 
	const FSlateBrush* InBrush, 
	const FSlateRect& InClippingRect, 
	ESlateDrawEffect::Type InDrawEffects, 
	float Angle,
	TOptional<FVector2D> InRotationPoint,
	ERotationSpace RotationSpace,
	const FLinearColor& InTint )
{
	FSlateDrawElement& DrawElt = ElementList.AddUninitialized();
	DrawElt.ElementType = (InBrush->DrawAs == ESlateBrushDrawType::Border) ? ET_Border : ET_Box;
	DrawElt.Position = PaintGeometry.DrawPosition;
	DrawElt.Size = PaintGeometry.DrawSize;
	DrawElt.ClippingRect = InClippingRect;
	DrawElt.Layer = InLayer;
	DrawElt.DrawEffects = InDrawEffects;
	DrawElt.Scale = PaintGeometry.DrawScale;

	FVector2D RotationPoint = GetRotationPoint( PaintGeometry, InRotationPoint, RotationSpace );
	DrawElt.DataPayload.SetRotatedBoxPayloadProperties( InBrush, Angle, RotationPoint, InTint );
}