mirror of
https://github.com/gryf/wmaker.git
synced 2026-02-12 03:35:52 +01:00
- converted all floats to double.
This commit is contained in:
@@ -237,7 +237,7 @@ typedef struct W_ColorPanel {
|
|||||||
int colx, coly; /* (x,y) of sel.-marker in WheelMode */
|
int colx, coly; /* (x,y) of sel.-marker in WheelMode */
|
||||||
int palx, paly; /* (x,y) of sel.-marker in
|
int palx, paly; /* (x,y) of sel.-marker in
|
||||||
CustomPaletteMode */
|
CustomPaletteMode */
|
||||||
float palXRatio, palYRatio; /* Ratios in x & y between
|
double palXRatio, palYRatio; /* Ratios in x & y between
|
||||||
original and scaled
|
original and scaled
|
||||||
palettesize */
|
palettesize */
|
||||||
int currentPalette;
|
int currentPalette;
|
||||||
@@ -2091,7 +2091,7 @@ wheelInitMatrix(W_ColorPanel *panel)
|
|||||||
|
|
||||||
if (sat < 256) {
|
if (sat < 256) {
|
||||||
if (xcor != 0)
|
if (xcor != 0)
|
||||||
dhue[0] = rint(atan((float)ycor / (float)xcor) *
|
dhue[0] = rint(atan((double)ycor / (double)xcor) *
|
||||||
(180.0 / M_PI)) + (xcor < 0 ? 180.0 : 0.0);
|
(180.0 / M_PI)) + (xcor < 0 ? 180.0 : 0.0);
|
||||||
else
|
else
|
||||||
dhue[0] = 270;
|
dhue[0] = 270;
|
||||||
@@ -2409,7 +2409,7 @@ wheelPositionSelectionOutBounds(W_ColorPanel *panel, int x, int y)
|
|||||||
panel->color.hsv.value = 255 - WMGetSliderValue(panel->wheelBrightnessS);
|
panel->color.hsv.value = 255 - WMGetSliderValue(panel->wheelBrightnessS);
|
||||||
|
|
||||||
if (xcor != 0)
|
if (xcor != 0)
|
||||||
hue = rint(atan(- (float)ycor / (float)xcor) * (180.0/M_PI));
|
hue = rint(atan(- (double)ycor / (double)xcor) * (180.0/M_PI));
|
||||||
else {
|
else {
|
||||||
if (ycor < 0)
|
if (ycor < 0)
|
||||||
hue = 90;
|
hue = 90;
|
||||||
@@ -2634,7 +2634,7 @@ cmykSliderCallback(WMWidget *w, void *data)
|
|||||||
int value[4];
|
int value[4];
|
||||||
char tmp[4];
|
char tmp[4];
|
||||||
W_ColorPanel *panel = (W_ColorPanel*)data;
|
W_ColorPanel *panel = (W_ColorPanel*)data;
|
||||||
float scale;
|
double scale;
|
||||||
|
|
||||||
value[0] = WMGetSliderValue(panel->cmykCyanS);
|
value[0] = WMGetSliderValue(panel->cmykCyanS);
|
||||||
value[1] = WMGetSliderValue(panel->cmykMagentaS);
|
value[1] = WMGetSliderValue(panel->cmykMagentaS);
|
||||||
@@ -2667,7 +2667,7 @@ cmykTextFieldCallback(void *observerData, WMNotification *notification)
|
|||||||
int value[4];
|
int value[4];
|
||||||
char tmp[4];
|
char tmp[4];
|
||||||
int n;
|
int n;
|
||||||
float scale;
|
double scale;
|
||||||
W_ColorPanel *panel = (W_ColorPanel*)observerData;
|
W_ColorPanel *panel = (W_ColorPanel*)observerData;
|
||||||
|
|
||||||
value[0] = atoi(WMGetTextFieldText(panel->cmykCyanT));
|
value[0] = atoi(WMGetTextFieldText(panel->cmykCyanT));
|
||||||
@@ -2987,10 +2987,10 @@ customSetPalette(W_ColorPanel *panel)
|
|||||||
panel->palx-2, panel->paly-2);
|
panel->palx-2, panel->paly-2);
|
||||||
XFreePixmap(scr->display, image);
|
XFreePixmap(scr->display, image);
|
||||||
|
|
||||||
panel->palXRatio = (float)(panel->customPaletteImg->width) /
|
panel->palXRatio = (double)(panel->customPaletteImg->width) /
|
||||||
(float)(customPaletteWidth);
|
(double)(customPaletteWidth);
|
||||||
panel->palYRatio = (float)(panel->customPaletteImg->height) /
|
panel->palYRatio = (double)(panel->customPaletteImg->height) /
|
||||||
(float)(customPaletteHeight);
|
(double)(customPaletteHeight);
|
||||||
|
|
||||||
item = WMGetPopUpButtonSelectedItem (panel->customPaletteHistoryBtn);
|
item = WMGetPopUpButtonSelectedItem (panel->customPaletteHistoryBtn);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user