From 5959be0518f7dc197c46f9e44ce729558ad62281 Mon Sep 17 00:00:00 2001 From: "Kirill Lipatov (Leency)" Date: Wed, 25 Apr 2018 11:18:22 +0000 Subject: [PATCH] IconEdit 0.49: draw bar tool (filled rectangle) git-svn-id: svn://kolibrios.org@7259 a494cfbc-eb01-0410-851d-a64ba20cac60 --- data/common/icons16.png | Bin 7514 -> 7526 bytes programs/cmm/easyshot/easyshot.c | 11 ++-- programs/cmm/iconedit/colors_mas.h | 4 +- programs/cmm/iconedit/iconedit.c | 13 ++-- programs/cmm/iconedit/tools.h | 63 +++++++++--------- programs/cmm/iconedit/tools/simple_figure.h | 67 ++++++++++++-------- 6 files changed, 89 insertions(+), 69 deletions(-) diff --git a/data/common/icons16.png b/data/common/icons16.png index 658884953f42d80ff868f398cfd02dd5536ad215..4caaf873941df726aa792a132a0ca653ed50b5a2 100644 GIT binary patch delta 7012 zcmV-q8=K_XI_5f%7k}^w1^@s6o+$Oo0012=NklSf3muY97|8!=a z|4cjW%uro)qpF=5Gyg7Hs;Xics#L4Alp3{$MrqO_g4l(k5nHNMXlxM?Nn{g*BoYyX zL>jd;hzNPJ@cp0PiF4ik-uHc@(w67>y30A=&-tBm&pGdX?|*ymjRY_MNv962$IkhG z(24dt0#N45mkz0PF6Jc;aSu=)eN8oKGQ>3@Wrj;f0OXU$0&Tc+{3*ZO6Y0N;6_;?XwA8UEzdRPa9?sVd z&~iXDmq!3H7M?7{%7j8&h-79?$UKQ?2C#!jX6CfKT7VryGBYayRuB&8Ju^*iGyxKT zmC<>sG|KC!4YUBa8?k-?v~8qp2SP-%IM zHK4HYq<V`jy1#%ker-p39$tTxm>JQYD8vB zfIF(U^TB1*Yz(PgDik#NE2r~;F@WZSBgY)g2gZQV!$O;*iSCC7!lg@5>kVA~xK{Bd4H(v#iS?HNR{Eu}b z5`VzRn7i~rUOkG?HUa_&laMe|1g0H{%)I4U>B1z8lxAd>0a`O7Fw^5_u(B`M#`*i`MB{EwE1Pgylp3RfV{js zS*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WA5C!=+>

$AK_+F z=U&73{)X%^B};%Xv&$E#2}+aA4H`Tk_fk`U)=Ym=nk~Ds(p)({h>N!E%qqZ@vLYa7 z2A5OwHLs)sxMP+9=ei`xU6aRiV)*dt467BY)O za$>fENJeIQIf9X%d8R*?5+Z5M^i~0Sw}Do|tcBq+;ye)*?+kT(l~i8 zR6>7@%%V#C$$McI0QyG>W@b?(%2PY>8UXl1QY?ekETR(T>usO`7(wWD1tg_eek98X zpoEy26~oyWpoAEiRp$q00Ok3E*{i|i)o`xUjzo3)+e<#O9G~VXjqBpGWGP`rlIKL)I8jpOw#a`c z14!N8|A;40>0hjf;Oo`Z)m+N`q(Q!8YXKtcA%1iCj+~>#JOi0%Dd5U|l!w-3fS?jY zluRYicJIY|xM-dBQJR1mMnFr-MAaeVp=w}62Kc(DBIPlSK$Ic?!Ylw3J}pfnAb@Br zWfe#wjh3bnP=>yPeB}nC(n!KY>y&p#28hE*38Fs`NQ5g6qX?bSR7XJoXs3`k<^u-# z$%m1mqJ1Kd3ZNYWPNn*I|8e}@s65TD#{hRvv~C>0@mZRadV16bKQe&XmrA>|x&s(} pskAx?_qYw*x`yI0z}?>%{vTbr;GdX@`=kH>002ovPDHLkV1j-= 0) && (figTool.startY >= 0)) { + + x1 = figTool.startX - canvas.x/zoom.value; + y1 = figTool.startY - canvas.y/zoom.value; + x2 = mouseX - canvas.x/zoom.value; + y2 = mouseY - canvas.y/zoom.value; + // Draw line from start position to current position if (currentTool == TOOL_LINE) { - DrawLineIcon(figTool.startX - canvas.x/zoom.value, - figTool.startY - canvas.y/zoom.value, - mouseX - canvas.x/zoom.value, - mouseY - canvas.y/zoom.value, - tool_color, - TOIMAGE); + DrawLineIcon(x1, y1, x2, y2, tool_color, TOIMAGE); } else if (currentTool == TOOL_RECT) { - DrawRectangleIcon(figTool.startX - canvas.x/zoom.value, - figTool.startY - canvas.y/zoom.value, - mouseX - canvas.x/zoom.value, - mouseY - canvas.y/zoom.value, tool_color, - TOIMAGE); + DrawRectangleIcon(x1, y1, x2, y2, tool_color, TOIMAGE); + } + else if (currentTool == TOOL_BAR) { + DrawBarIcon(x1, y1, x2, y2, tool_color, TOIMAGE); } DrawCanvas(); @@ -82,24 +84,21 @@ void SimpleFigureTool_onMouseEvent(int mouseX, int mouseY, int lkm, int pkm) { } void SimpleFigureTool_onCanvasDraw() { - if ((figTool.startX >= 0) + int x1, y1, x2, y2; + if ((figTool.startX >= 0) && (figTool.startY >= 0) && (mouse.key)) { - if (currentTool == TOOL_LINE) { - DrawLineIcon(figTool.startX - canvas.x/zoom.value, - figTool.startY - canvas.y/zoom.value, - mouseX_last - canvas.x/zoom.value, - mouseY_last - canvas.y/zoom.value, - tool_color, - TOCANVAS); - } - else if (currentTool == TOOL_RECT) { - DrawRectangleIcon(figTool.startX - canvas.x/zoom.value, - figTool.startY - canvas.y/zoom.value, - mouseX_last - canvas.x/zoom.value, - mouseY_last - canvas.y/zoom.value, - tool_color, - TOCANVAS); - } + + x1 = figTool.startX - canvas.x/zoom.value; + y1 = figTool.startY - canvas.y/zoom.value; + x2 = mouseX_last - canvas.x/zoom.value; + y2 = mouseY_last - canvas.y/zoom.value; + + if (currentTool == TOOL_LINE) + DrawLineIcon(x1, y1, x2, y2, tool_color, TOCANVAS); + else if (currentTool == TOOL_RECT) + DrawRectangleIcon(x1, y1, x2, y2, tool_color, TOCANVAS); + else if (currentTool == TOOL_BAR) + DrawBarIcon(x1, y1, x2, y2, tool_color, TOCANVAS); figTool.lastTempPosX = mouseX_last - canvas.x/zoom.value; figTool.lastTempPosY = mouseY_last - canvas.y/zoom.value; @@ -178,3 +177,15 @@ void DrawRectangleIcon(int x1, int y1, int x2, int y2, dword color, int target) DrawLineIcon(x1, y2, x1, y1, color, target); } +void DrawBarIcon(int x1, int y1, int x2, int y2, dword color, int target) { + signed signY; + if (y1 < y2) + signY = 1; + else + signY = -1; + + while (y1 != y2+signY) { + DrawLineIcon(x1, y1, x2, y1, color, target); + y1 += signY; + } +} \ No newline at end of file