mirror of
https://github.com/Xaymar/obs-StreamFX
synced 2024-11-10 22:05:06 +00:00
395e284a37
This is the new code base for blur effects, which is much more effective at being re-usable than the old code base. It allows for much better extendable behavior and uses an interface and factory pattern, instead of hardcoding supported features.
65 lines
1.6 KiB
C++
65 lines
1.6 KiB
C++
// Modern effects for a modern Streamer
|
|
// Copyright (C) 2019 Michael Fabian Dirks
|
|
//
|
|
// This program is free software; you can redistribute it and/or modify
|
|
// it under the terms of the GNU General Public License as published by
|
|
// the Free Software Foundation; either version 2 of the License, or
|
|
// (at your option) any later version.
|
|
//
|
|
// This program is distributed in the hope that it will be useful,
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
// GNU General Public License for more details.
|
|
//
|
|
// You should have received a copy of the GNU General Public License
|
|
// along with this program; if not, write to the Free Software
|
|
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
|
|
|
#include "gfx-blur-base.hpp"
|
|
|
|
void gfx::blur::ibase::set_step_scale_x(double_t v)
|
|
{
|
|
this->set_step_scale(v, this->get_step_scale_y());
|
|
}
|
|
|
|
void gfx::blur::ibase::set_step_scale_y(double_t v) {
|
|
this->set_step_scale(this->get_step_scale_x(), v);
|
|
}
|
|
|
|
double_t gfx::blur::ibase::get_step_scale_x()
|
|
{
|
|
double_t x, y;
|
|
this->get_step_scale(x, y);
|
|
return x;
|
|
}
|
|
|
|
double_t gfx::blur::ibase::get_step_scale_y()
|
|
{
|
|
double_t x, y;
|
|
this->get_step_scale(x, y);
|
|
return y;
|
|
}
|
|
|
|
void gfx::blur::ibase_center::set_center_x(double_t v)
|
|
{
|
|
this->set_center(v, this->get_center_y());
|
|
}
|
|
|
|
void gfx::blur::ibase_center::set_center_y(double_t v)
|
|
{
|
|
this->set_center(this->get_center_x(), v);
|
|
}
|
|
|
|
double_t gfx::blur::ibase_center::get_center_x()
|
|
{
|
|
double_t x, y;
|
|
this->get_center(x, y);
|
|
return x;
|
|
}
|
|
|
|
double_t gfx::blur::ibase_center::get_center_y()
|
|
{
|
|
double_t x, y;
|
|
this->get_center(x, y);
|
|
return y;
|
|
}
|