20 int lenswy,
int lenspix,
int sx,
int sy);
32 int l, h,
p, d, md, x, y, wx, wy, ox, oy, px, py;
34 int dred, dgreen, dblu;
36 wx = lenswx / lenspix;
37 wy = lenswy / lenspix;
49 dd = (double) (h - l) / 256.0;
56 for(y = sy - wy / 2; y < sy + wy / 2; y++)
62 for(x = sx - wx / 2; x < sx + wx / 2; x++)
64 if(x >= 0 && x < maxplotw && y >= 0 && y <
maxploth)
68 ox = (long) (x - (sx - wx / 2)) * p;
69 oy = (long) (y - (sy - wy / 2)) * p;
70 for(py = 0; py <
p; py++)
71 for(px = 0; px <
p; px++)
77 MDrawImage(lensdraw, lensmim, 0, 0, wx * p, wy * p, 0, 0);
96 int l = (int) o_data, w = (
int) a_data;
void MObjectSetBackgroundRGB(MOBJECT obj, int r, int g, int b)
void MObjectSetShadow(MOBJECT obj, int type, int in, int out)
void MShellRealize(MOBJECT obj)
void MDrawLine(MOBJECT p, int x1, int y1, int x2, int y2, MTColor col)
MOBJECT MCreateLabel(MOBJECT parent, const char *text, MTFont font)
void MObjectSetResize(MOBJECT obj, int resize_w, int resize_h)
void D_LensZoom(MOBJECT o, MVALUE o_data, void *a_data)
void MDrawAreaSetResizeCallback(MOBJECT obj, DRAWAREA_PREF_CB cb, void *ad)
void MShellUnrealize(MOBJECT obj)
void MShellDestroy(MOBJECT obj)
void D_LensResizeCB(MOBJECT obj, DRAWAREA_PREF *pref, void *ad)
void D_DoLens(MIMAGE lensmim, MOBJECT lensdraw, int lenswx, int lenswy, int lenspix, int sx, int sy)
void D_LensCloseCB(MOBJECT p, void *od, void *ad)
DrawArea Object's resize data.
MOBJECT MCreateScrollBar(MOBJECT parent, int type, long n, long max)
void MImageSetPixelRGB(MIMAGE pmi, int x, int y, int r, int g, int b)
void MScrollBarSetPos(MOBJECT p, long pos)
void MDrawBox(MOBJECT p, int x, int y, int w, int h, MTColor bgc)
void(* OBJ_EVENT_CB)(MOBJECT obj, MEvent *e, void *ad)
void MFreeImage(MIMAGE data)
MOBJECT MCreateDrawArea(MOBJECT parent, int width, int height)
MOBJECT MCreateColForm(MOBJECT parent)
void MDrawAreaSetExposeCallback(MOBJECT obj, OBJ_EVENT_CB cb, void *ad)
MOBJECT MCreateShell(const char *title, int flags)
void MInstallImage(MIMAGE data)
void MShellRaise(MOBJECT obj)
void MDrawImage(MOBJECT p, MIMAGE gi, int pm_x, int pm_y, int w, int h, int x, int y)
int MGetScreenWidth(void)
void MUninstallImage(MIMAGE data)
MIMAGE MAllocImage(int img_w, int img_h, int nplanes)
void MImageGetPixelRGB(MIMAGE pmi, int x, int y, int *pr, int *pg, int *pb)
void MShellSetWMCloseCallback(MOBJECT p, WM_CLOSE_CB cb, void *a_data)
MOBJECT MCreateRowForm(MOBJECT parent)
void MScrollBarSetPosCallback(MOBJECT p, OBJ_VALUE_CB cb, void *data)