You've already forked lazarus-ccr
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@1528 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@@ -37,18 +37,15 @@
|
||||
<PackageName Value="LCL"/>
|
||||
</Item2>
|
||||
</RequiredPackages>
|
||||
<Units Count="29">
|
||||
<Units Count="31">
|
||||
<Unit0>
|
||||
<Filename Value="lazimageeditor.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<UnitName Value="lazimageeditor"/>
|
||||
<IsVisibleTab Value="True"/>
|
||||
<EditorIndex Value="5"/>
|
||||
<WindowIndex Value="0"/>
|
||||
<TopLine Value="1"/>
|
||||
<CursorPos X="105" Y="12"/>
|
||||
<UsageCount Value="44"/>
|
||||
<Loaded Value="True"/>
|
||||
<CursorPos X="103" Y="12"/>
|
||||
<UsageCount Value="53"/>
|
||||
</Unit0>
|
||||
<Unit1>
|
||||
<Filename Value="main.pas"/>
|
||||
@@ -59,9 +56,9 @@
|
||||
<UnitName Value="Main"/>
|
||||
<EditorIndex Value="0"/>
|
||||
<WindowIndex Value="0"/>
|
||||
<TopLine Value="1035"/>
|
||||
<CursorPos X="22" Y="1054"/>
|
||||
<UsageCount Value="44"/>
|
||||
<TopLine Value="426"/>
|
||||
<CursorPos X="28" Y="444"/>
|
||||
<UsageCount Value="53"/>
|
||||
<Loaded Value="True"/>
|
||||
<LoadedDesigner Value="True"/>
|
||||
</Unit1>
|
||||
@@ -70,9 +67,9 @@
|
||||
<UnitName Value="PictureCtrls"/>
|
||||
<EditorIndex Value="2"/>
|
||||
<WindowIndex Value="0"/>
|
||||
<TopLine Value="18"/>
|
||||
<CursorPos X="14" Y="34"/>
|
||||
<UsageCount Value="18"/>
|
||||
<TopLine Value="915"/>
|
||||
<CursorPos X="16" Y="934"/>
|
||||
<UsageCount Value="23"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit2>
|
||||
<Unit3>
|
||||
@@ -84,7 +81,7 @@
|
||||
<WindowIndex Value="0"/>
|
||||
<TopLine Value="27"/>
|
||||
<CursorPos X="3" Y="40"/>
|
||||
<UsageCount Value="10"/>
|
||||
<UsageCount Value="9"/>
|
||||
</Unit3>
|
||||
<Unit4>
|
||||
<Filename Value="test.pas"/>
|
||||
@@ -95,7 +92,7 @@
|
||||
<WindowIndex Value="0"/>
|
||||
<TopLine Value="61"/>
|
||||
<CursorPos X="5" Y="85"/>
|
||||
<UsageCount Value="10"/>
|
||||
<UsageCount Value="9"/>
|
||||
</Unit4>
|
||||
<Unit5>
|
||||
<Filename Value="newdialog.pas"/>
|
||||
@@ -106,7 +103,7 @@
|
||||
<WindowIndex Value="0"/>
|
||||
<TopLine Value="49"/>
|
||||
<CursorPos X="3" Y="66"/>
|
||||
<UsageCount Value="10"/>
|
||||
<UsageCount Value="9"/>
|
||||
</Unit5>
|
||||
<Unit6>
|
||||
<Filename Value="resizedialog.pas"/>
|
||||
@@ -117,7 +114,7 @@
|
||||
<WindowIndex Value="0"/>
|
||||
<TopLine Value="27"/>
|
||||
<CursorPos X="42" Y="37"/>
|
||||
<UsageCount Value="10"/>
|
||||
<UsageCount Value="9"/>
|
||||
</Unit6>
|
||||
<Unit7>
|
||||
<Filename Value="resizepaperdialog.pas"/>
|
||||
@@ -125,12 +122,10 @@
|
||||
<HasResources Value="True"/>
|
||||
<ResourceBaseClass Value="Form"/>
|
||||
<UnitName Value="ResizePaperDialog"/>
|
||||
<EditorIndex Value="4"/>
|
||||
<WindowIndex Value="0"/>
|
||||
<TopLine Value="18"/>
|
||||
<CursorPos X="63" Y="34"/>
|
||||
<UsageCount Value="10"/>
|
||||
<Loaded Value="True"/>
|
||||
<TopLine Value="105"/>
|
||||
<CursorPos X="51" Y="28"/>
|
||||
<UsageCount Value="13"/>
|
||||
</Unit7>
|
||||
<Unit8>
|
||||
<Filename Value="aboutdialog.pas"/>
|
||||
@@ -141,7 +136,7 @@
|
||||
<WindowIndex Value="0"/>
|
||||
<TopLine Value="44"/>
|
||||
<CursorPos X="1" Y="56"/>
|
||||
<UsageCount Value="10"/>
|
||||
<UsageCount Value="9"/>
|
||||
</Unit8>
|
||||
<Unit9>
|
||||
<Filename Value="T:\LazRGB\rgbgraphics.pas"/>
|
||||
@@ -149,14 +144,14 @@
|
||||
<WindowIndex Value="0"/>
|
||||
<TopLine Value="34"/>
|
||||
<CursorPos X="46" Y="33"/>
|
||||
<UsageCount Value="10"/>
|
||||
<UsageCount Value="9"/>
|
||||
</Unit9>
|
||||
<Unit10>
|
||||
<Filename Value="lazimageditor.rc"/>
|
||||
<WindowIndex Value="0"/>
|
||||
<TopLine Value="1"/>
|
||||
<CursorPos X="1" Y="1"/>
|
||||
<UsageCount Value="10"/>
|
||||
<UsageCount Value="9"/>
|
||||
<DefaultSyntaxHighlighter Value="None"/>
|
||||
</Unit10>
|
||||
<Unit11>
|
||||
@@ -164,14 +159,14 @@
|
||||
<WindowIndex Value="0"/>
|
||||
<TopLine Value="1"/>
|
||||
<CursorPos X="77" Y="6"/>
|
||||
<UsageCount Value="10"/>
|
||||
<UsageCount Value="9"/>
|
||||
</Unit11>
|
||||
<Unit12>
|
||||
<Filename Value="T:\fpclaz\laz\lcl\graphics.pp"/>
|
||||
<UnitName Value="Graphics"/>
|
||||
<WindowIndex Value="0"/>
|
||||
<TopLine Value="1087"/>
|
||||
<CursorPos X="19" Y="1101"/>
|
||||
<TopLine Value="2116"/>
|
||||
<CursorPos X="27" Y="2142"/>
|
||||
<UsageCount Value="10"/>
|
||||
</Unit12>
|
||||
<Unit13>
|
||||
@@ -181,7 +176,7 @@
|
||||
<WindowIndex Value="0"/>
|
||||
<TopLine Value="7"/>
|
||||
<CursorPos X="1" Y="1"/>
|
||||
<UsageCount Value="19"/>
|
||||
<UsageCount Value="24"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit13>
|
||||
<Unit14>
|
||||
@@ -190,7 +185,7 @@
|
||||
<WindowIndex Value="0"/>
|
||||
<TopLine Value="361"/>
|
||||
<CursorPos X="80" Y="382"/>
|
||||
<UsageCount Value="19"/>
|
||||
<UsageCount Value="18"/>
|
||||
</Unit14>
|
||||
<Unit15>
|
||||
<Filename Value="rgbroutines.pas"/>
|
||||
@@ -198,7 +193,7 @@
|
||||
<WindowIndex Value="0"/>
|
||||
<TopLine Value="989"/>
|
||||
<CursorPos X="102" Y="750"/>
|
||||
<UsageCount Value="16"/>
|
||||
<UsageCount Value="15"/>
|
||||
</Unit15>
|
||||
<Unit16>
|
||||
<Filename Value="rgbwinroutines.pas"/>
|
||||
@@ -206,7 +201,7 @@
|
||||
<WindowIndex Value="0"/>
|
||||
<TopLine Value="21"/>
|
||||
<CursorPos X="40" Y="34"/>
|
||||
<UsageCount Value="10"/>
|
||||
<UsageCount Value="9"/>
|
||||
</Unit16>
|
||||
<Unit17>
|
||||
<Filename Value="T:\LazRGB\rgbtypes.pas"/>
|
||||
@@ -214,7 +209,7 @@
|
||||
<WindowIndex Value="0"/>
|
||||
<TopLine Value="55"/>
|
||||
<CursorPos X="37" Y="69"/>
|
||||
<UsageCount Value="11"/>
|
||||
<UsageCount Value="10"/>
|
||||
</Unit17>
|
||||
<Unit18>
|
||||
<Filename Value="T:\LazRGB\rgbutils.pas"/>
|
||||
@@ -222,7 +217,7 @@
|
||||
<WindowIndex Value="0"/>
|
||||
<TopLine Value="22"/>
|
||||
<CursorPos X="1" Y="1"/>
|
||||
<UsageCount Value="11"/>
|
||||
<UsageCount Value="10"/>
|
||||
</Unit18>
|
||||
<Unit19>
|
||||
<Filename Value="T:\LazRGB\rgbroutines.pas"/>
|
||||
@@ -230,7 +225,7 @@
|
||||
<WindowIndex Value="0"/>
|
||||
<TopLine Value="1"/>
|
||||
<CursorPos X="45" Y="1"/>
|
||||
<UsageCount Value="10"/>
|
||||
<UsageCount Value="9"/>
|
||||
</Unit19>
|
||||
<Unit20>
|
||||
<Filename Value="rgbqtroutines.pas"/>
|
||||
@@ -238,16 +233,16 @@
|
||||
<WindowIndex Value="0"/>
|
||||
<TopLine Value="1"/>
|
||||
<CursorPos X="52" Y="13"/>
|
||||
<UsageCount Value="10"/>
|
||||
<UsageCount Value="9"/>
|
||||
</Unit20>
|
||||
<Unit21>
|
||||
<Filename Value="bmprgbtypes.pas"/>
|
||||
<UnitName Value="BmpRGBTypes"/>
|
||||
<EditorIndex Value="3"/>
|
||||
<WindowIndex Value="0"/>
|
||||
<TopLine Value="194"/>
|
||||
<CursorPos X="18" Y="159"/>
|
||||
<UsageCount Value="19"/>
|
||||
<TopLine Value="367"/>
|
||||
<CursorPos X="12" Y="386"/>
|
||||
<UsageCount Value="24"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit21>
|
||||
<Unit22>
|
||||
@@ -255,14 +250,14 @@
|
||||
<WindowIndex Value="0"/>
|
||||
<TopLine Value="255"/>
|
||||
<CursorPos X="23" Y="271"/>
|
||||
<UsageCount Value="10"/>
|
||||
<UsageCount Value="9"/>
|
||||
</Unit22>
|
||||
<Unit23>
|
||||
<Filename Value="T:\fpclaz\laz\lcl\lcltype.pp"/>
|
||||
<UnitName Value="LCLType"/>
|
||||
<WindowIndex Value="0"/>
|
||||
<TopLine Value="1181"/>
|
||||
<CursorPos X="3" Y="1197"/>
|
||||
<TopLine Value="1215"/>
|
||||
<CursorPos X="15" Y="1231"/>
|
||||
<UsageCount Value="10"/>
|
||||
</Unit23>
|
||||
<Unit24>
|
||||
@@ -271,16 +266,16 @@
|
||||
<WindowIndex Value="0"/>
|
||||
<TopLine Value="9"/>
|
||||
<CursorPos X="1" Y="1"/>
|
||||
<UsageCount Value="10"/>
|
||||
<UsageCount Value="9"/>
|
||||
</Unit24>
|
||||
<Unit25>
|
||||
<Filename Value="bmprgbutils.pas"/>
|
||||
<UnitName Value="BmpRGBUtils"/>
|
||||
<EditorIndex Value="6"/>
|
||||
<EditorIndex Value="5"/>
|
||||
<WindowIndex Value="0"/>
|
||||
<TopLine Value="108"/>
|
||||
<CursorPos X="41" Y="128"/>
|
||||
<UsageCount Value="14"/>
|
||||
<TopLine Value="42"/>
|
||||
<CursorPos X="53" Y="59"/>
|
||||
<UsageCount Value="19"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit25>
|
||||
<Unit26>
|
||||
@@ -289,7 +284,7 @@
|
||||
<WindowIndex Value="0"/>
|
||||
<TopLine Value="267"/>
|
||||
<CursorPos X="15" Y="283"/>
|
||||
<UsageCount Value="10"/>
|
||||
<UsageCount Value="9"/>
|
||||
</Unit26>
|
||||
<Unit27>
|
||||
<Filename Value="T:\fpclaz\laz\lcl\graphtype.pp"/>
|
||||
@@ -297,139 +292,158 @@
|
||||
<WindowIndex Value="0"/>
|
||||
<TopLine Value="24"/>
|
||||
<CursorPos X="45" Y="35"/>
|
||||
<UsageCount Value="10"/>
|
||||
<UsageCount Value="9"/>
|
||||
</Unit27>
|
||||
<Unit28>
|
||||
<Filename Value="bmprgbgraph.pas"/>
|
||||
<UnitName Value="BmpRGBGraph"/>
|
||||
<EditorIndex Value="7"/>
|
||||
<EditorIndex Value="6"/>
|
||||
<WindowIndex Value="0"/>
|
||||
<TopLine Value="20"/>
|
||||
<CursorPos X="76" Y="36"/>
|
||||
<UsageCount Value="10"/>
|
||||
<TopLine Value="375"/>
|
||||
<CursorPos X="20" Y="394"/>
|
||||
<UsageCount Value="15"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit28>
|
||||
<Unit29>
|
||||
<Filename Value="rgbdrawutils.pas"/>
|
||||
<UnitName Value="rgbdrawutils"/>
|
||||
<IsVisibleTab Value="True"/>
|
||||
<EditorIndex Value="4"/>
|
||||
<WindowIndex Value="0"/>
|
||||
<TopLine Value="50"/>
|
||||
<CursorPos X="25" Y="72"/>
|
||||
<UsageCount Value="14"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit29>
|
||||
<Unit30>
|
||||
<Filename Value="T:\fpclaz\laz\lcl\intfgraphics.pas"/>
|
||||
<UnitName Value="IntfGraphics"/>
|
||||
<WindowIndex Value="0"/>
|
||||
<TopLine Value="241"/>
|
||||
<CursorPos X="15" Y="257"/>
|
||||
<UsageCount Value="11"/>
|
||||
</Unit30>
|
||||
</Units>
|
||||
<JumpHistory Count="30" HistoryIndex="29">
|
||||
<Position1>
|
||||
<Filename Value="picturectrls.pas"/>
|
||||
<Caret Line="239" Column="20" TopLine="222"/>
|
||||
<Filename Value="rgbdrawutils.pas"/>
|
||||
<Caret Line="70" Column="12" TopLine="71"/>
|
||||
</Position1>
|
||||
<Position2>
|
||||
<Filename Value="picturectrls.pas"/>
|
||||
<Caret Line="256" Column="20" TopLine="230"/>
|
||||
<Filename Value="rgbdrawutils.pas"/>
|
||||
<Caret Line="94" Column="46" TopLine="78"/>
|
||||
</Position2>
|
||||
<Position3>
|
||||
<Filename Value="main.pas"/>
|
||||
<Caret Line="578" Column="33" TopLine="562"/>
|
||||
<Filename Value="rgbdrawutils.pas"/>
|
||||
<Caret Line="95" Column="20" TopLine="78"/>
|
||||
</Position3>
|
||||
<Position4>
|
||||
<Filename Value="main.pas"/>
|
||||
<Caret Line="1054" Column="22" TopLine="1035"/>
|
||||
<Filename Value="rgbdrawutils.pas"/>
|
||||
<Caret Line="265" Column="7" TopLine="240"/>
|
||||
</Position4>
|
||||
<Position5>
|
||||
<Filename Value="picturectrls.pas"/>
|
||||
<Caret Line="95" Column="51" TopLine="79"/>
|
||||
<Filename Value="rgbdrawutils.pas"/>
|
||||
<Caret Line="213" Column="22" TopLine="197"/>
|
||||
</Position5>
|
||||
<Position6>
|
||||
<Filename Value="picturectrls.pas"/>
|
||||
<Caret Line="238" Column="8" TopLine="218"/>
|
||||
<Filename Value="rgbdrawutils.pas"/>
|
||||
<Caret Line="200" Column="1" TopLine="170"/>
|
||||
</Position6>
|
||||
<Position7>
|
||||
<Filename Value="picturectrls.pas"/>
|
||||
<Caret Line="249" Column="37" TopLine="232"/>
|
||||
<Filename Value="rgbdrawutils.pas"/>
|
||||
<Caret Line="49" Column="1" TopLine="34"/>
|
||||
</Position7>
|
||||
<Position8>
|
||||
<Filename Value="picturectrls.pas"/>
|
||||
<Caret Line="251" Column="20" TopLine="232"/>
|
||||
<Filename Value="rgbdrawutils.pas"/>
|
||||
<Caret Line="56" Column="18" TopLine="51"/>
|
||||
</Position8>
|
||||
<Position9>
|
||||
<Filename Value="picturectrls.pas"/>
|
||||
<Caret Line="252" Column="8" TopLine="232"/>
|
||||
<Filename Value="rgbdrawutils.pas"/>
|
||||
<Caret Line="316" Column="1" TopLine="285"/>
|
||||
</Position9>
|
||||
<Position10>
|
||||
<Filename Value="picturectrls.pas"/>
|
||||
<Caret Line="253" Column="28" TopLine="232"/>
|
||||
<Filename Value="rgbdrawutils.pas"/>
|
||||
<Caret Line="60" Column="33" TopLine="44"/>
|
||||
</Position10>
|
||||
<Position11>
|
||||
<Filename Value="picturectrls.pas"/>
|
||||
<Caret Line="254" Column="27" TopLine="232"/>
|
||||
<Filename Value="rgbdrawutils.pas"/>
|
||||
<Caret Line="91" Column="23" TopLine="82"/>
|
||||
</Position11>
|
||||
<Position12>
|
||||
<Filename Value="picturectrls.pas"/>
|
||||
<Caret Line="304" Column="17" TopLine="284"/>
|
||||
<Filename Value="rgbdrawutils.pas"/>
|
||||
<Caret Line="78" Column="1" TopLine="35"/>
|
||||
</Position12>
|
||||
<Position13>
|
||||
<Filename Value="picturectrls.pas"/>
|
||||
<Caret Line="5" Column="87" TopLine="1"/>
|
||||
<Filename Value="rgbdrawutils.pas"/>
|
||||
<Caret Line="388" Column="23" TopLine="370"/>
|
||||
</Position13>
|
||||
<Position14>
|
||||
<Filename Value="picturectrls.pas"/>
|
||||
<Caret Line="53" Column="17" TopLine="27"/>
|
||||
<Filename Value="rgbdrawutils.pas"/>
|
||||
<Caret Line="56" Column="28" TopLine="54"/>
|
||||
</Position14>
|
||||
<Position15>
|
||||
<Filename Value="picturectrls.pas"/>
|
||||
<Caret Line="276" Column="24" TopLine="259"/>
|
||||
<Filename Value="rgbdrawutils.pas"/>
|
||||
<Caret Line="62" Column="48" TopLine="40"/>
|
||||
</Position15>
|
||||
<Position16>
|
||||
<Filename Value="picturectrls.pas"/>
|
||||
<Caret Line="277" Column="24" TopLine="259"/>
|
||||
<Filename Value="rgbdrawutils.pas"/>
|
||||
<Caret Line="152" Column="21" TopLine="126"/>
|
||||
</Position16>
|
||||
<Position17>
|
||||
<Filename Value="picturectrls.pas"/>
|
||||
<Caret Line="280" Column="83" TopLine="259"/>
|
||||
<Filename Value="rgbdrawutils.pas"/>
|
||||
<Caret Line="155" Column="13" TopLine="129"/>
|
||||
</Position17>
|
||||
<Position18>
|
||||
<Filename Value="picturectrls.pas"/>
|
||||
<Caret Line="304" Column="17" TopLine="281"/>
|
||||
<Filename Value="rgbdrawutils.pas"/>
|
||||
<Caret Line="157" Column="22" TopLine="131"/>
|
||||
</Position18>
|
||||
<Position19>
|
||||
<Filename Value="picturectrls.pas"/>
|
||||
<Caret Line="307" Column="17" TopLine="281"/>
|
||||
<Filename Value="rgbdrawutils.pas"/>
|
||||
<Caret Line="159" Column="19" TopLine="133"/>
|
||||
</Position19>
|
||||
<Position20>
|
||||
<Filename Value="picturectrls.pas"/>
|
||||
<Caret Line="309" Column="40" TopLine="283"/>
|
||||
<Filename Value="rgbdrawutils.pas"/>
|
||||
<Caret Line="184" Column="33" TopLine="158"/>
|
||||
</Position20>
|
||||
<Position21>
|
||||
<Filename Value="picturectrls.pas"/>
|
||||
<Caret Line="310" Column="40" TopLine="284"/>
|
||||
<Filename Value="rgbdrawutils.pas"/>
|
||||
<Caret Line="264" Column="45" TopLine="242"/>
|
||||
</Position21>
|
||||
<Position22>
|
||||
<Filename Value="picturectrls.pas"/>
|
||||
<Caret Line="313" Column="59" TopLine="287"/>
|
||||
<Filename Value="rgbdrawutils.pas"/>
|
||||
<Caret Line="387" Column="9" TopLine="371"/>
|
||||
</Position22>
|
||||
<Position23>
|
||||
<Filename Value="picturectrls.pas"/>
|
||||
<Caret Line="413" Column="48" TopLine="413"/>
|
||||
<Filename Value="rgbdrawutils.pas"/>
|
||||
<Caret Line="406" Column="1" TopLine="375"/>
|
||||
</Position23>
|
||||
<Position24>
|
||||
<Filename Value="picturectrls.pas"/>
|
||||
<Caret Line="34" Column="35" TopLine="18"/>
|
||||
<Filename Value="rgbdrawutils.pas"/>
|
||||
<Caret Line="387" Column="11" TopLine="371"/>
|
||||
</Position24>
|
||||
<Position25>
|
||||
<Filename Value="bmprgbtypes.pas"/>
|
||||
<Caret Line="341" Column="85" TopLine="335"/>
|
||||
<Filename Value="rgbdrawutils.pas"/>
|
||||
<Caret Line="73" Column="17" TopLine="49"/>
|
||||
</Position25>
|
||||
<Position26>
|
||||
<Filename Value="bmprgbtypes.pas"/>
|
||||
<Caret Line="43" Column="55" TopLine="27"/>
|
||||
<Filename Value="rgbdrawutils.pas"/>
|
||||
<Caret Line="65" Column="51" TopLine="58"/>
|
||||
</Position26>
|
||||
<Position27>
|
||||
<Filename Value="bmprgbtypes.pas"/>
|
||||
<Caret Line="44" Column="6" TopLine="27"/>
|
||||
<Filename Value="rgbdrawutils.pas"/>
|
||||
<Caret Line="55" Column="28" TopLine="45"/>
|
||||
</Position27>
|
||||
<Position28>
|
||||
<Filename Value="bmprgbtypes.pas"/>
|
||||
<Caret Line="209" Column="9" TopLine="191"/>
|
||||
<Filename Value="rgbdrawutils.pas"/>
|
||||
<Caret Line="72" Column="26" TopLine="46"/>
|
||||
</Position28>
|
||||
<Position29>
|
||||
<Filename Value="resizepaperdialog.pas"/>
|
||||
<Caret Line="205" Column="1" TopLine="187"/>
|
||||
<Filename Value="rgbdrawutils.pas"/>
|
||||
<Caret Line="275" Column="29" TopLine="251"/>
|
||||
</Position29>
|
||||
<Position30>
|
||||
<Filename Value="resizepaperdialog.pas"/>
|
||||
<Caret Line="34" Column="55" TopLine="18"/>
|
||||
<Filename Value="rgbdrawutils.pas"/>
|
||||
<Caret Line="71" Column="18" TopLine="50"/>
|
||||
</Position30>
|
||||
</JumpHistory>
|
||||
</ProjectOptions>
|
||||
|
File diff suppressed because it is too large
Load Diff
405
applications/lazimageeditor/rgbdrawutils.pas
Normal file
405
applications/lazimageeditor/rgbdrawutils.pas
Normal file
@@ -0,0 +1,405 @@
|
||||
unit rgbdrawutils;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, LCLType, LCLIntf, LMessages, LCLProc, Controls, Graphics,
|
||||
Forms, Types, IntfGraphics, FPImage, Math, FPImgCanv, FPCanvas;
|
||||
|
||||
type
|
||||
PRGBTripleArray = ^TRGBTripleArray;
|
||||
TRGBTripleArray = array[0..32767] of TRGBTriple;
|
||||
|
||||
TCustomRGBBitmapCore = class(TBitmap)
|
||||
private
|
||||
FIntfImg: TLazIntfImage;
|
||||
FFillColor: TColor;
|
||||
FOutlineColor: TColor;
|
||||
FPaperColor: TColor;
|
||||
function GetScanline(Row: integer): Pointer;
|
||||
function GetFillColor: TColor;
|
||||
function GetOutlineColor: TColor;
|
||||
function GetPaperColor: TColor;
|
||||
procedure SetFillColor(const AValue: TColor);
|
||||
procedure SetOutlineColor(const AValue: TColor);
|
||||
procedure SetPaperColor(const AValue: TColor);
|
||||
protected
|
||||
procedure SetWidth(Value: integer); override;
|
||||
procedure SetHeight(Value: integer); override;
|
||||
public
|
||||
constructor Create; override;
|
||||
destructor Destroy; override;
|
||||
procedure ApplyScanLine;
|
||||
procedure Clear; virtual;
|
||||
procedure ClearWhite; virtual;
|
||||
procedure Invert; virtual;
|
||||
procedure FlipHorz; virtual;
|
||||
procedure FlipVert; virtual;
|
||||
procedure Rotate90; virtual;
|
||||
procedure Rotate180; virtual;
|
||||
procedure Rotate270; virtual;
|
||||
procedure FillEllipse(X1, Y1, X2, Y2: integer); virtual;
|
||||
property FillColor: TColor read GetFillColor write SetFillColor;
|
||||
property OutlineColor: TColor read GetOutlineColor write SetOutlineColor;
|
||||
property PaperColor: TColor read GetPaperColor write SetPaperColor;
|
||||
property ScanLine[Row: integer]: Pointer read GetScanLine;
|
||||
end;
|
||||
|
||||
implementation
|
||||
|
||||
procedure BMPRotate90(const Bitmap: TCustomRGBBitmapCore);
|
||||
var
|
||||
i, j: integer;
|
||||
rowIn, rowOut: PRGBTripleArray;
|
||||
Bmp: TCustomRGBBitmapCore;
|
||||
Width, Height: integer;
|
||||
begin
|
||||
Bmp := TCustomRGBBitmapCore.Create;
|
||||
Bmp.Width := Bitmap.Height;
|
||||
Bmp.Height := Bitmap.Width;
|
||||
Bmp.PixelFormat := pf24bit;
|
||||
Width := Bitmap.Width - 1;
|
||||
Height := Bitmap.Height - 1;
|
||||
for j := 0 to Height do
|
||||
begin
|
||||
rowIn := Bitmap.ScanLine[j];
|
||||
for i := 0 to Width do
|
||||
begin
|
||||
rowOut := Bmp.ScanLine[i];
|
||||
// Inc(rowOut, Height - j);
|
||||
rowOut^[i * (Height - j)] := rowIn^[i];
|
||||
// Inc(rowIn);
|
||||
end;
|
||||
end;
|
||||
Bmp.ApplyScanLine;
|
||||
Bitmap.Assign(Bmp);
|
||||
end;
|
||||
|
||||
procedure BMPRotate180(const Bitmap: TCustomRGBBitmapCore);
|
||||
var
|
||||
i, j: integer;
|
||||
rowIn, rowOut: pRGBTriple;
|
||||
Bmp: TCustomRGBBitmapCore;
|
||||
Width, Height: integer;
|
||||
begin
|
||||
Bmp := TCustomRGBBitmapCore.Create;
|
||||
Bmp.Width := Bitmap.Width;
|
||||
Bmp.Height := Bitmap.Height;
|
||||
Bmp.PixelFormat := pf24bit;
|
||||
Width := Bitmap.Width - 1;
|
||||
Height := Bitmap.Height - 1;
|
||||
for j := 0 to Height do
|
||||
begin
|
||||
rowIn := Bitmap.ScanLine[j];
|
||||
for i := 0 to Width do
|
||||
begin
|
||||
rowOut := Bmp.ScanLine[Height - j];
|
||||
Inc(rowOut, Width - i);
|
||||
rowOut^ := rowIn^;
|
||||
Inc(rowIn);
|
||||
end;
|
||||
end;
|
||||
Bmp.ApplyScanLine;
|
||||
Bitmap.Assign(Bmp);
|
||||
end;
|
||||
|
||||
procedure BMPRotate270(const Bitmap: TCustomRGBBitmapCore);
|
||||
var
|
||||
i, j: integer;
|
||||
rowIn, rowOut: pRGBTriple;
|
||||
Bmp: TCustomRGBBitmapCore;
|
||||
Width, Height: integer;
|
||||
begin
|
||||
Bmp := TCustomRGBBitmapCore.Create;
|
||||
Bmp.Width := Bitmap.Height;
|
||||
Bmp.Height := Bitmap.Width;
|
||||
Bmp.PixelFormat := pf24bit;
|
||||
Width := Bitmap.Width - 1;
|
||||
Height := Bitmap.Height - 1;
|
||||
for j := 0 to Height do
|
||||
begin
|
||||
rowIn := Bitmap.ScanLine[j];
|
||||
for i := 0 to Width do
|
||||
begin
|
||||
rowOut := Bmp.ScanLine[Width - i];
|
||||
Inc(rowOut, j);
|
||||
rowOut^ := rowIn^;
|
||||
Inc(rowIn);
|
||||
end;
|
||||
end;
|
||||
Bmp.ApplyScanLine;
|
||||
Bitmap.Assign(Bmp);
|
||||
end;
|
||||
|
||||
function RotateBitmap(Bitmap: TCustomRGBBitmapCore; Angle: integer;
|
||||
BackColor: TColor): TCustomRGBBitmapCore;
|
||||
var
|
||||
i, j, iOriginal, jOriginal, CosPoint, SinPoint: integer;
|
||||
RowOriginal, RowRotated: pRGBTriple;
|
||||
SinTheta, CosTheta: extended;
|
||||
AngleAdd: integer;
|
||||
begin
|
||||
Result := TCustomRGBBitmapCore.Create;
|
||||
Result.PixelFormat := pf24bit;
|
||||
Result.Canvas.Brush.Color := BackColor;
|
||||
Angle := Angle mod 360;
|
||||
if Angle < 0 then
|
||||
Angle := 360 - Abs(Angle);
|
||||
if Angle = 0 then
|
||||
Result.Assign(Bitmap)
|
||||
else if Angle = 90 then
|
||||
begin
|
||||
Result.Assign(Bitmap);
|
||||
BMPRotate90(Result);
|
||||
end
|
||||
else if (Angle > 90) and (Angle < 180) then
|
||||
begin
|
||||
AngleAdd := 90;
|
||||
Angle := Angle - AngleAdd;
|
||||
end
|
||||
else if Angle = 180 then
|
||||
begin
|
||||
Result.Assign(Bitmap);
|
||||
BMPRotate180(Result);
|
||||
end
|
||||
else if (Angle > 180) and (Angle < 270) then
|
||||
begin
|
||||
AngleAdd := 180;
|
||||
Angle := Angle - AngleAdd;
|
||||
end
|
||||
else if Angle = 270 then
|
||||
begin
|
||||
Result.Assign(Bitmap);
|
||||
BMPRotate270(Result);
|
||||
end
|
||||
else if (Angle > 270) and (Angle < 360) then
|
||||
begin
|
||||
AngleAdd := 270;
|
||||
Angle := Angle - AngleAdd;
|
||||
end
|
||||
else
|
||||
AngleAdd := 0;
|
||||
if (Angle > 0) and (Angle < 90) then
|
||||
begin
|
||||
SinCos((Angle + AngleAdd) * Pi / 180, SinTheta, CosTheta);
|
||||
if (SinTheta * CosTheta) < 0 then
|
||||
begin
|
||||
Result.Width := Round(Abs(Bitmap.Width * CosTheta - Bitmap.Height * SinTheta));
|
||||
Result.Height := Round(Abs(Bitmap.Width * SinTheta - Bitmap.Height * CosTheta));
|
||||
end
|
||||
else
|
||||
begin
|
||||
Result.Width := Round(Abs(Bitmap.Width * CosTheta + Bitmap.Height * SinTheta));
|
||||
Result.Height := Round(Abs(Bitmap.Width * SinTheta + Bitmap.Height * CosTheta));
|
||||
end;
|
||||
CosTheta := Abs(CosTheta);
|
||||
SinTheta := Abs(SinTheta);
|
||||
if (AngleAdd = 0) or (AngleAdd = 180) then
|
||||
begin
|
||||
CosPoint := Round(Bitmap.Height * CosTheta);
|
||||
SinPoint := Round(Bitmap.Height * SinTheta);
|
||||
end
|
||||
else
|
||||
begin
|
||||
SinPoint := Round(Bitmap.Width * CosTheta);
|
||||
CosPoint := Round(Bitmap.Width * SinTheta);
|
||||
end;
|
||||
for j := 0 to Result.Height - 1 do
|
||||
begin
|
||||
RowRotated := Result.Scanline[j];
|
||||
for i := 0 to Result.Width - 1 do
|
||||
begin
|
||||
case AngleAdd of
|
||||
0:
|
||||
begin
|
||||
jOriginal := Round((j + 1) * CosTheta - (i + 1 - SinPoint) * SinTheta) - 1;
|
||||
iOriginal := Round((i + 1) * CosTheta - (CosPoint - j - 1) * SinTheta) - 1;
|
||||
end;
|
||||
90:
|
||||
begin
|
||||
iOriginal := Round((j + 1) * SinTheta - (i + 1 - SinPoint) * CosTheta) - 1;
|
||||
jOriginal := Bitmap.Height - Round((i + 1) * SinTheta -
|
||||
(CosPoint - j - 1) * CosTheta);
|
||||
end;
|
||||
180:
|
||||
begin
|
||||
jOriginal := Bitmap.Height - Round((j + 1) * CosTheta -
|
||||
(i + 1 - SinPoint) * SinTheta);
|
||||
iOriginal := Bitmap.Width - Round((i + 1) * CosTheta -
|
||||
(CosPoint - j - 1) * SinTheta);
|
||||
end;
|
||||
270:
|
||||
begin
|
||||
iOriginal := Bitmap.Width - Round((j + 1) * SinTheta -
|
||||
(i + 1 - SinPoint) * CosTheta);
|
||||
jOriginal := Round((i + 1) * SinTheta - (CosPoint - j - 1) * CosTheta) - 1;
|
||||
end;
|
||||
end;
|
||||
if (iOriginal >= 0) and (iOriginal <= Bitmap.Width - 1) and
|
||||
(jOriginal >= 0) and (jOriginal <= Bitmap.Height - 1) then
|
||||
begin
|
||||
RowOriginal := Bitmap.Scanline[jOriginal];
|
||||
Inc(RowOriginal, iOriginal);
|
||||
RowRotated^ := RowOriginal^;
|
||||
Inc(RowRotated);
|
||||
end
|
||||
else
|
||||
begin
|
||||
Inc(RowRotated);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
Result.ApplyScanLine;
|
||||
end;
|
||||
|
||||
procedure DrawSamePixel(ABitmap: TCustomRGBBitmapCore; Value: integer);
|
||||
var
|
||||
LNew: TRGBTriple;
|
||||
LMinusRatio: real;
|
||||
LScan: PRGBTripleArray;
|
||||
i, j: integer;
|
||||
begin
|
||||
for i := 0 to ABitmap.Height - 1 do
|
||||
begin
|
||||
LScan := ABitmap.Scanline[i];
|
||||
for j := 0 to ABitmap.Width - 1 do
|
||||
begin
|
||||
LNew.rgbtBlue := Value; //LNew.rgbtBlue - Value;
|
||||
LNew.rgbtGreen := Value; //LNew.rgbtGreen - Value;
|
||||
LNew.rgbtRed := Value; //LNew.rgbtRed - Value;
|
||||
LScan^[j] := LNew;
|
||||
end;
|
||||
end;
|
||||
ABitmap.ApplyScanLine;
|
||||
end;
|
||||
|
||||
constructor TCustomRGBBitmapCore.Create;
|
||||
begin
|
||||
inherited;
|
||||
PixelFormat := pf24bit;
|
||||
FIntfImg := TLazIntfImage.Create(0, 0);
|
||||
FIntfImg.LoadFromBitmap(Handle, MaskHandle);
|
||||
end;
|
||||
|
||||
destructor TCustomRGBBitmapCore.Destroy;
|
||||
begin
|
||||
FIntfImg.Free;
|
||||
inherited;
|
||||
end;
|
||||
|
||||
function TCustomRGBBitmapCore.GetScanLine(Row: integer): Pointer;
|
||||
var
|
||||
ImgHandle, ImgMaskHandle: HBitmap;
|
||||
begin
|
||||
Result := FIntfImg.GetDataLineStart(Row);
|
||||
end;
|
||||
|
||||
procedure TCustomRGBBitmapCore.ApplyScanLine;
|
||||
var
|
||||
TmpBmp: TBitmap;
|
||||
ImgHandle, ImgMaskHandle: HBitmap;
|
||||
begin
|
||||
TmpBmp := TBitmap.Create;
|
||||
TmpBmp.PixelFormat := pf24bit;
|
||||
FIntfImg.CreateBitmaps(ImgHandle, ImgMaskHandle, False);
|
||||
TmpBmp.Handle := ImgHandle;
|
||||
TmpBmp.MaskHandle := ImgMaskHandle;
|
||||
Empty;
|
||||
Canvas.Draw(0, 0, TmpBmp);
|
||||
TmpBmp.Free;
|
||||
FIntfImg.LoadFromBitmap(Handle, MaskHandle);
|
||||
end;
|
||||
|
||||
function TCustomRGBBitmapCore.GetFillColor: TColor;
|
||||
begin
|
||||
Result := FFillColor;
|
||||
end;
|
||||
|
||||
function TCustomRGBBitmapCore.GetOutlineColor: TColor;
|
||||
begin
|
||||
Result := FOutlineColor;
|
||||
end;
|
||||
|
||||
function TCustomRGBBitmapCore.GetPaperColor: TColor;
|
||||
begin
|
||||
Result := FPaperColor;
|
||||
end;
|
||||
|
||||
procedure TCustomRGBBitmapCore.SetFillColor(const AValue: TColor);
|
||||
begin
|
||||
FFillColor := AValue;
|
||||
end;
|
||||
|
||||
procedure TCustomRGBBitmapCore.SetOutlineColor(const AValue: TColor);
|
||||
begin
|
||||
FOutlineColor := AValue;
|
||||
end;
|
||||
|
||||
procedure TCustomRGBBitmapCore.SetPaperColor(const AValue: TColor);
|
||||
begin
|
||||
FPaperColor := AValue;
|
||||
end;
|
||||
|
||||
procedure TCustomRGBBitmapCore.SetWidth(Value: integer);
|
||||
begin
|
||||
inherited;
|
||||
FIntfImg.LoadFromBitmap(Handle, MaskHandle);
|
||||
end;
|
||||
|
||||
procedure TCustomRGBBitmapCore.SetHeight(Value: integer);
|
||||
begin
|
||||
inherited;
|
||||
FIntfImg.LoadFromBitmap(Handle, MaskHandle);
|
||||
end;
|
||||
|
||||
procedure TCustomRGBBitmapCore.Clear;
|
||||
begin
|
||||
|
||||
end;
|
||||
|
||||
procedure TCustomRGBBitmapCore.ClearWhite;
|
||||
begin
|
||||
|
||||
end;
|
||||
|
||||
procedure TCustomRGBBitmapCore.Invert;
|
||||
begin
|
||||
|
||||
end;
|
||||
|
||||
procedure TCustomRGBBitmapCore.FlipHorz;
|
||||
begin
|
||||
|
||||
end;
|
||||
|
||||
procedure TCustomRGBBitmapCore.FlipVert;
|
||||
begin
|
||||
|
||||
end;
|
||||
|
||||
procedure TCustomRGBBitmapCore.Rotate90;
|
||||
begin
|
||||
//DrawSamePixel(Self, 240);
|
||||
BMPRotate90(Self);
|
||||
end;
|
||||
|
||||
procedure TCustomRGBBitmapCore.Rotate180;
|
||||
begin
|
||||
RotateBitmap(Self, 180, clWhite);
|
||||
end;
|
||||
|
||||
procedure TCustomRGBBitmapCore.Rotate270;
|
||||
begin
|
||||
RotateBitmap(Self, 270, clWhite);
|
||||
end;
|
||||
|
||||
procedure TCustomRGBBitmapCore.FillEllipse(X1, Y1, X2, Y2: integer);
|
||||
begin
|
||||
|
||||
end;
|
||||
|
||||
end.
|
||||
|
Reference in New Issue
Block a user