b23f8cc6e1
There are a ridiculous number of features related to scaling and positioning due to requests by a number of people who complained that they hated the way that OBS1 would always resize their sources when the source's base size changed. There were also people who wanted more control for how the resizing was handled, or the ability to completely prevent resizing entirely if desired. So I made it so that you can optionally use a 'bounds' system, which allows you to specify different styles of controlling resizing. If disabled, the source will always automatically resize and only the base scale is applied. If enabled, you have a variety of different ways to limit/control how it can resize within the bounds, or make it so it can't resize at all. You can also control alignment within that bounding box, so you can make it so that a source always aligns to a side or corner of the box. I also added an alignment value which changes how the source is oriented relative to the position of the scene item. For example, setting bottom-right alignment will make it so that the position of the item is the bottom right corner of the source. When the source resizies, it will resize leftward and upward in that case, which solves the problem of how a source resizes relative to a desired position.
41 lines
1.5 KiB
C
41 lines
1.5 KiB
C
/******************************************************************************
|
|
Copyright (C) 2013-2014 by Hugh Bailey <obs.jim@gmail.com>
|
|
|
|
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, see <http://www.gnu.org/licenses/>.
|
|
******************************************************************************/
|
|
|
|
#pragma once
|
|
|
|
/** Maximum number of source channels for output and per display */
|
|
#define MAX_CHANNELS 64
|
|
|
|
#define OBS_ALIGN_CENTER (0)
|
|
#define OBS_ALIGN_LEFT (1<<0)
|
|
#define OBS_ALIGN_RIGHT (1<<1)
|
|
#define OBS_ALIGN_TOP (1<<2)
|
|
#define OBS_ALIGN_BOTTOM (1<<3)
|
|
|
|
#define MODULE_SUCCESS 0
|
|
#define MODULE_ERROR -1
|
|
#define MODULE_FILE_NOT_FOUND -2
|
|
#define MODULE_FUNCTION_NOT_FOUND -3
|
|
#define MODULE_INCOMPATIBLE_VER -4
|
|
|
|
#define OBS_OUTPUT_SUCCESS 0
|
|
#define OBS_OUTPUT_BAD_PATH -1
|
|
#define OBS_OUTPUT_CONNECT_FAILED -2
|
|
#define OBS_OUTPUT_INVALID_STREAM -3
|
|
#define OBS_OUTPUT_ERROR -4
|
|
#define OBS_OUTPUT_DISCONNECTED -5
|