Files
UnrealEngineUWP/Engine/Source/Editor/Sequencer/Private/SequencerSectionPainter.cpp
Ben Marsh 20bf0eb6a1 Updating copyright notices to 2017 (copying from //Tasks/UE4/Dev-Copyright-2017).
#rb none
#lockdown Nick.Penwarden

[CL 3226823 by Ben Marsh in Main branch]
2016-12-08 08:52:44 -05:00

34 lines
896 B
C++

// Copyright 1998-2017 Epic Games, Inc. All Rights Reserved.
#include "SequencerSectionPainter.h"
#include "MovieSceneTrack.h"
FSequencerSectionPainter::FSequencerSectionPainter(FSlateWindowElementList& OutDrawElements, const FGeometry& InSectionGeometry, UMovieSceneSection& InSection)
: Section(InSection)
, DrawElements(OutDrawElements)
, SectionGeometry(InSectionGeometry)
, LayerId(0)
, bParentEnabled(true)
{
}
int32 FSequencerSectionPainter::PaintSectionBackground()
{
return PaintSectionBackground(GetTrack()->GetColorTint());
}
UMovieSceneTrack* FSequencerSectionPainter::GetTrack() const
{
return Section.GetTypedOuter<UMovieSceneTrack>();
}
FLinearColor FSequencerSectionPainter::BlendColor(FLinearColor InColor)
{
static FLinearColor BaseColor(FColor(71,71,71));
const float Alpha = InColor.A;
InColor.A = 1.f;
return BaseColor * (1.f - Alpha) + InColor * Alpha;
}