projects
/
goodguy
/
history.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
intl tweaks and olafs de.po, drag label rework
[goodguy/history.git]
/
cinelerra-5.1
/
cinelerra
/
colorpicker.C
diff --git
a/cinelerra-5.1/cinelerra/colorpicker.C
b/cinelerra-5.1/cinelerra/colorpicker.C
index c82e728a644618e0c0a54a4019b2e4f4a70a424e..1b40fcf0c38f8d00bca6f4b35972422918d71c3c 100644
(file)
--- a/
cinelerra-5.1/cinelerra/colorpicker.C
+++ b/
cinelerra-5.1/cinelerra/colorpicker.C
@@
-21,6
+21,7
@@
#include "bcbutton.h"
#include "bccapture.h"
#include "bcbutton.h"
#include "bccapture.h"
+#include "bccolors.h"
#include "bcdisplayinfo.h"
#include "colorpicker.h"
#include "condition.h"
#include "bcdisplayinfo.h"
#include "colorpicker.h"
#include "condition.h"
@@
-28,18
+29,15
@@
#include "language.h"
#include "mutex.h"
#include "mwindow.h"
#include "language.h"
#include "mutex.h"
#include "mwindow.h"
-#include "
ci
colors.h"
+#include "
bc
colors.h"
#include "vframe.h"
#include <string.h>
#include <unistd.h>
#include "vframe.h"
#include <string.h>
#include <unistd.h>
-#undef MSGQUAL
-#define MSGQUAL "colorpicker"
-
#define PALETTE_DATA "palette.dat"
#define PALETTE_DATA "palette.dat"
-Color
Thread::ColorThread
(int do_alpha, const char *title)
+Color
Picker::ColorPicker
(int do_alpha, const char *title)
: BC_DialogThread()
{
this->title = title;
: BC_DialogThread()
{
this->title = title;
@@
-49,17
+47,17
@@
ColorThread::ColorThread(int do_alpha, const char *title)
this->alpha = 255;
}
this->alpha = 255;
}
-Color
Thread::~ColorThread
()
+Color
Picker::~ColorPicker
()
{
close_window();
}
{
close_window();
}
-void Color
Thread
::start_window(int output, int alpha, int do_okcancel)
+void Color
Picker
::start_window(int output, int alpha, int do_okcancel)
{
if( running() ) {
ColorWindow *gui = (ColorWindow *)get_gui();
if( gui ) {
{
if( running() ) {
ColorWindow *gui = (ColorWindow *)get_gui();
if( gui ) {
- gui->lock_window("Color
Thread
::start_window");
+ gui->lock_window("Color
Picker
::start_window");
gui->raise_window(1);
gui->unlock_window();
}
gui->raise_window(1);
gui->unlock_window();
}
@@
-71,7
+69,7
@@
void ColorThread::start_window(int output, int alpha, int do_okcancel)
start();
}
start();
}
-BC_Window* Color
Thread
::new_gui()
+BC_Window* Color
Picker
::new_gui()
{
char window_title[BCTEXTLEN];
strcpy(window_title, _(PROGRAM_NAME ": "));
{
char window_title[BCTEXTLEN];
strcpy(window_title, _(PROGRAM_NAME ": "));
@@
-92,7
+90,7
@@
BC_Window* ColorThread::new_gui()
return gui;
}
return gui;
}
-void Color
Thread
::update_gui(int output, int alpha)
+void Color
Picker
::update_gui(int output, int alpha)
{
ColorWindow *gui = (ColorWindow *)get_gui();
if( !gui ) return;
{
ColorWindow *gui = (ColorWindow *)get_gui();
if( !gui ) return;
@@
-104,14
+102,14
@@
void ColorThread::update_gui(int output, int alpha)
gui->unlock_window();
}
gui->unlock_window();
}
-int Color
Thread
::handle_new_color(int output, int alpha)
+int Color
Picker
::handle_new_color(int output, int alpha)
{
{
- printf("Color
Thread
::handle_new_color undefined.\n");
+ printf("Color
Picker
::handle_new_color undefined.\n");
return 0;
}
return 0;
}
-ColorWindow::ColorWindow(Color
Thread
*thread, int x, int y, int w, int h, const char *title)
+ColorWindow::ColorWindow(Color
Picker
*thread, int x, int y, int w, int h, const char *title)
: BC_Window(title, x, y, w, h, w, h, 0, 0, 1)
{
this->thread = thread;
: BC_Window(title, x, y, w, h, w, h, 0, 0, 1)
{
this->thread = thread;
@@
-315,7
+313,7
@@
int ColorWindow::handle_event()
void ColorWindow::get_screen_sample()
{
int cx, cy;
void ColorWindow::get_screen_sample()
{
int cx, cy;
- get_abs_cursor
_xy
(cx, cy);
+ get_abs_cursor(cx, cy);
BC_Capture capture_bitmap(1, 1, 0);
VFrame vframe(1,1,BC_RGB888);
capture_bitmap.capture_frame(&vframe, cx,cy);
BC_Capture capture_bitmap(1, 1, 0);
VFrame vframe(1,1,BC_RGB888);
capture_bitmap.capture_frame(&vframe, cx,cy);
@@
-580,7
+578,7
@@
PaletteWheelValue::~PaletteWheelValue()
void PaletteWheelValue::create_objects()
{
void PaletteWheelValue::create_objects()
{
- frame = new VFrame(
0, -1, get_w(), get_h(), BC_RGB888, -1
);
+ frame = new VFrame(
get_w(), get_h(), BC_RGB888
);
draw(window->hsv.h, window->hsv.s, window->hsv.v);
flash();
}
draw(window->hsv.h, window->hsv.s, window->hsv.v);
flash();
}
@@
-864,7
+862,7
@@
int PaletteCb::handle_event()
void ColorWindow::update_rgb(float r, float g, float b)
{
{ float y, u, v;
void ColorWindow::update_rgb(float r, float g, float b)
{
{ float y, u, v;
- YUV::rgb_to_yuv_f(r, g, b, y, u, v);
+ YUV::
yuv.
rgb_to_yuv_f(r, g, b, y, u, v);
u += 0.5; v += 0.5;
bclamp(y, 0, 1); yuv.y = y;
bclamp(u, 0, 1); yuv.u = u;
u += 0.5; v += 0.5;
bclamp(y, 0, 1); yuv.y = y;
bclamp(u, 0, 1); yuv.u = u;
@@
-880,7
+878,7
@@
void ColorWindow::update_yuv(float y, float u, float v)
{
u -= 0.5; v -= 0.5;
{ float r, g, b;
{
u -= 0.5; v -= 0.5;
{ float r, g, b;
- YUV::yuv_to_rgb_f(r, g, b, y, u, v);
+ YUV::yuv
.yuv
_to_rgb_f(r, g, b, y, u, v);
bclamp(r, 0, 1); rgb.r = r;
bclamp(g, 0, 1); rgb.g = g;
bclamp(b, 0, 1); rgb.b = b;
bclamp(r, 0, 1); rgb.r = r;
bclamp(g, 0, 1); rgb.g = g;
bclamp(b, 0, 1); rgb.b = b;
@@
-899,7
+897,7
@@
void ColorWindow::update_hsv(float h, float s, float v)
bclamp(g, 0, 1); rgb.g = g;
bclamp(b, 0, 1); rgb.b = b;
float y, u, v;
bclamp(g, 0, 1); rgb.g = g;
bclamp(b, 0, 1); rgb.b = b;
float y, u, v;
- YUV::rgb_to_yuv_f(r, g, b, y, u, v);
+ YUV::
yuv.
rgb_to_yuv_f(r, g, b, y, u, v);
u += 0.5; v += 0.5;
bclamp(y, 0, 1); yuv.y = y;
bclamp(u, 0, 1); yuv.u = u;
u += 0.5; v += 0.5;
bclamp(y, 0, 1); yuv.y = y;
bclamp(u, 0, 1); yuv.u = u;