jvcllaz: Fix JvMM demos for Linux. Less hints and warnings.

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6881 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2019-04-28 20:08:30 +00:00
parent d295accb2e
commit c04df98dba
29 changed files with 477 additions and 391 deletions

View File

@ -32,7 +32,7 @@ interface
uses
SysUtils, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls,
//DesignEditors, DesignIntf, DesignMenus, DesignWindows,
JvId3v2Base, JvId3v2Types, JvComponent;
JvId3v2Base, JvId3v2Types;
type

View File

@ -373,7 +373,7 @@ end;
procedure TJvID3FramesEditor.NewFrameClick(Sender: TObject);
var
Selection: TStringList;
//Selection: TStringList;
Frame: TJvID3Frame;
begin
Frame := DoNewFrame;
@ -478,8 +478,8 @@ end;
procedure TJvID3FramesEditor.UpdateFrameList;
var
ItemIndex, TopIndex: Integer;
Selection: TStringList;
//ItemIndex, TopIndex: Integer;
//Selection: TStringList;
EnableList: Boolean;
I: Integer;
Frame: TJvID3Frame;

View File

@ -5,7 +5,7 @@ uses
Forms,
BmpAnimMainFormU in 'BmpAnimMainFormU.pas' {BmpAnimMainForm};
{$R *.RES}
{$R *.res}
begin
Application.Initialize;

View File

@ -1,7 +1,7 @@
object JvFullColorCircleDlgMainFrm: TJvFullColorCircleDlgMainFrm
Left = 498
Left = 836
Height = 394
Top = 236
Top = 214
Width = 343
BorderStyle = bsDialog
Caption = 'JvFullColorCircleDlgMainFrm'
@ -14,34 +14,55 @@ object JvFullColorCircleDlgMainFrm: TJvFullColorCircleDlgMainFrm
Position = poScreenCenter
LCLVersion = '2.1.0.0'
object Bevel: TBevel
Left = 16
AnchorSideLeft.Control = Memo
AnchorSideLeft.Side = asrCenter
AnchorSideTop.Control = ComboBoxFileName
AnchorSideTop.Side = asrBottom
Left = 30
Height = 108
Top = 48
Top = 39
Width = 108
BorderSpacing.Left = 8
BorderSpacing.Top = 8
Style = bsRaised
end
object Image: TImage
Left = 20
AnchorSideLeft.Control = Bevel
AnchorSideLeft.Side = asrCenter
AnchorSideTop.Control = Bevel
AnchorSideTop.Side = asrCenter
Left = 34
Height = 100
Top = 52
Top = 43
Width = 100
Center = True
end
object LabelImage: TLabel
Left = 24
AnchorSideLeft.Control = Owner
AnchorSideTop.Control = ComboBoxFileName
AnchorSideTop.Side = asrCenter
Left = 8
Height = 15
Top = 16
Top = 12
Width = 39
BorderSpacing.Left = 8
Caption = 'Image :'
Layout = tlCenter
ParentColor = False
end
object Memo: TMemo
AnchorSideLeft.Control = Owner
AnchorSideTop.Control = Bevel
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = Bevel
AnchorSideRight.Side = asrBottom
Left = 8
Height = 65
Top = 160
Width = 129
Height = 72
Top = 155
Width = 152
Alignment = taCenter
BorderSpacing.Left = 8
BorderSpacing.Top = 8
BorderStyle = bsNone
Lines.Strings = (
'Original image'
@ -52,10 +73,17 @@ object JvFullColorCircleDlgMainFrm: TJvFullColorCircleDlgMainFrm
TabOrder = 0
end
object ComboBoxFileName: TComboBox
Left = 72
AnchorSideLeft.Control = LabelImage
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = Owner
AnchorSideRight.Side = asrBottom
Left = 55
Height = 23
Top = 16
Width = 257
Top = 8
Width = 225
BorderSpacing.Left = 8
BorderSpacing.Top = 8
BorderSpacing.Right = 8
DropDownCount = 24
ItemHeight = 15
OnClick = ComboBoxFileNameSelect

View File

@ -97,7 +97,7 @@ var
Index: Integer;
LSearchRec: TSearchRec;
begin
ImgDir := IncludeTrailingPathDelimiter(GetCurrentDir) + '..\..\design\JvCtrls\images\';
ImgDir := IncludeTrailingPathDelimiter(GetCurrentDir) + '../../design/JvCtrls/images/';
if FindFirst(ImgDir + '*.png', faAnyFile, LSearchRec) = 0 then
repeat
ComboBoxFileName.Items.Add(LSearchRec.Name);

View File

@ -1,14 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<ProjectOptions>
<Version Value="11"/>
<Version Value="12"/>
<PathDelim Value="\"/>
<General>
<Flags>
<UseDefaultCompilerOptions Value="True"/>
<CompatibilityMode Value="True"/>
</Flags>
<SessionStorage Value="InProjectDir"/>
<MainUnit Value="0"/>
<Title Value="JvFullColorCircleDialogPrj"/>
<Scaled Value="True"/>
<ResourceType Value="res"/>

View File

@ -1,14 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<ProjectOptions>
<Version Value="11"/>
<Version Value="12"/>
<PathDelim Value="\"/>
<General>
<Flags>
<UseDefaultCompilerOptions Value="True"/>
<CompatibilityMode Value="True"/>
</Flags>
<SessionStorage Value="InProjectDir"/>
<MainUnit Value="0"/>
<Title Value="JvFullColorDialogPrj"/>
<Scaled Value="True"/>
<ResourceType Value="res"/>
@ -16,7 +15,6 @@
<XPManifest>
<DpiAware Value="True"/>
</XPManifest>
<Icon Value="0"/>
</General>
<BuildModes Count="1">
<Item1 Name="Default" Default="True"/>

View File

@ -1,11 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<ProjectOptions>
<Version Value="11"/>
<Version Value="12"/>
<PathDelim Value="\"/>
<General>
<Flags>
<CompatibilityMode Value="True"/>
</Flags>
<SessionStorage Value="InProjectDir"/>
<MainUnit Value="0"/>
<Title Value="JvID3v1Demo"/>
<ResourceType Value="res"/>
<UseXPManifest Value="True"/>

View File

@ -18,7 +18,7 @@ object JvID3v1MainForm: TJvID3v1MainForm
OnDropFiles = FormDropFiles
Position = poScreenCenter
ShowHint = True
LCLVersion = '1.6.4.0'
LCLVersion = '2.1.0.0'
object lblArtist: TLabel
AnchorSideTop.Control = edtArtist
AnchorSideTop.Side = asrCenter
@ -26,7 +26,7 @@ object JvID3v1MainForm: TJvID3v1MainForm
AnchorSideRight.Side = asrBottom
Left = 30
Height = 15
Top = 131
Top = 141
Width = 28
Anchors = [akTop, akRight]
Caption = '&Artist'
@ -40,7 +40,7 @@ object JvID3v1MainForm: TJvID3v1MainForm
AnchorSideRight.Side = asrBottom
Left = 22
Height = 15
Top = 158
Top = 168
Width = 36
Anchors = [akTop, akRight]
Caption = 'Al&bum'
@ -55,7 +55,7 @@ object JvID3v1MainForm: TJvID3v1MainForm
AnchorSideRight.Side = asrBottom
Left = 36
Height = 15
Top = 185
Top = 195
Width = 22
Anchors = [akTop, akRight]
Caption = '&Year'
@ -68,7 +68,7 @@ object JvID3v1MainForm: TJvID3v1MainForm
AnchorSideTop.Side = asrCenter
Left = 4
Height = 15
Top = 212
Top = 222
Width = 54
BorderSpacing.Left = 4
Caption = '&Comment'
@ -82,7 +82,7 @@ object JvID3v1MainForm: TJvID3v1MainForm
AnchorSideRight.Control = cmbGenre
Left = 132
Height = 15
Top = 185
Top = 195
Width = 51
Alignment = taRightJustify
Anchors = [akTop, akLeft, akRight]
@ -99,7 +99,7 @@ object JvID3v1MainForm: TJvID3v1MainForm
AnchorSideRight.Side = asrBottom
Left = 6
Height = 15
Top = 77
Top = 87
Width = 52
Anchors = [akTop, akRight]
Caption = 'lblHasTag'
@ -112,7 +112,7 @@ object JvID3v1MainForm: TJvID3v1MainForm
AnchorSideRight.Side = asrBottom
Left = 35
Height = 15
Top = 104
Top = 114
Width = 23
Anchors = [akTop, akRight]
Caption = '&Title'
@ -125,7 +125,7 @@ object JvID3v1MainForm: TJvID3v1MainForm
AnchorSideRight.Control = sedTrack
Left = 221
Height = 15
Top = 77
Top = 87
Width = 38
Anchors = [akTop, akRight]
BorderSpacing.Right = 4
@ -141,7 +141,7 @@ object JvID3v1MainForm: TJvID3v1MainForm
AnchorSideRight.Side = asrBottom
Left = 4
Height = 23
Top = 46
Top = 56
Width = 308
OnAcceptFileName = JvFilenameEdit1AcceptFileName
FilterIndex = 0
@ -167,7 +167,7 @@ object JvID3v1MainForm: TJvID3v1MainForm
AnchorSideRight.Side = asrBottom
Left = 62
Height = 23
Top = 100
Top = 110
Width = 250
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Left = 4
@ -184,7 +184,7 @@ object JvID3v1MainForm: TJvID3v1MainForm
AnchorSideRight.Side = asrBottom
Left = 62
Height = 23
Top = 154
Top = 164
Width = 250
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Left = 4
@ -201,7 +201,7 @@ object JvID3v1MainForm: TJvID3v1MainForm
AnchorSideRight.Side = asrBottom
Left = 62
Height = 23
Top = 127
Top = 137
Width = 250
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Left = 4
@ -216,7 +216,7 @@ object JvID3v1MainForm: TJvID3v1MainForm
AnchorSideTop.Side = asrBottom
Left = 62
Height = 23
Top = 181
Top = 191
Width = 58
BorderSpacing.Left = 4
BorderSpacing.Top = 4
@ -232,7 +232,7 @@ object JvID3v1MainForm: TJvID3v1MainForm
AnchorSideRight.Side = asrBottom
Left = 62
Height = 23
Top = 208
Top = 218
Width = 250
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Left = 4
@ -248,7 +248,7 @@ object JvID3v1MainForm: TJvID3v1MainForm
AnchorSideRight.Side = asrBottom
Left = 187
Height = 23
Top = 181
Top = 191
Width = 125
Anchors = [akTop, akRight]
BorderSpacing.Top = 4
@ -259,12 +259,12 @@ object JvID3v1MainForm: TJvID3v1MainForm
end
object ToolBar1: TToolBar
Left = 0
Height = 42
Height = 52
Top = 0
Width = 316
AutoSize = True
ButtonHeight = 40
ButtonWidth = 44
ButtonHeight = 50
ButtonWidth = 50
Caption = 'ToolBar1'
EdgeBorders = [ebBottom]
Images = ImageList1
@ -282,7 +282,7 @@ object JvID3v1MainForm: TJvID3v1MainForm
ShowHint = True
end
object ToolButton2: TToolButton
Left = 48
Left = 51
Hint = 'Save changes of the tag to the file'
Top = 0
Action = actSave
@ -290,7 +290,7 @@ object JvID3v1MainForm: TJvID3v1MainForm
ShowHint = True
end
object ToolButton3: TToolButton
Left = 92
Left = 101
Hint = 'Erase the tag of the file'
Top = 0
Action = actErase
@ -298,7 +298,7 @@ object JvID3v1MainForm: TJvID3v1MainForm
ShowHint = True
end
object ToolButton4: TToolButton
Left = 136
Left = 151
Hint = 'Toggle ''Always on Top'''
Top = 0
Action = actOnTop
@ -306,7 +306,7 @@ object JvID3v1MainForm: TJvID3v1MainForm
ShowHint = True
end
object ToolButton5: TToolButton
Left = 184
Left = 201
Hint = 'Show ''About'' dialog'
Top = 0
Action = actAbout
@ -314,7 +314,7 @@ object JvID3v1MainForm: TJvID3v1MainForm
ShowHint = True
end
object ToolButton6: TToolButton
Left = 228
Left = 251
Hint = 'Close program'
Top = 0
Action = actExit
@ -329,7 +329,7 @@ object JvID3v1MainForm: TJvID3v1MainForm
AnchorSideRight.Side = asrBottom
Left = 263
Height = 23
Top = 73
Top = 83
Width = 49
Alignment = taRightJustify
Anchors = [akTop, akRight]
@ -381,8 +381,8 @@ object JvID3v1MainForm: TJvID3v1MainForm
object ImageList1: TImageList
Height = 20
Width = 20
left = 72
top = 32
left = 80
top = 48
Bitmap = {
4C69060000001400000014000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000

View File

@ -1,11 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<ProjectOptions>
<Version Value="11"/>
<Version Value="12"/>
<PathDelim Value="\"/>
<General>
<Flags>
<CompatibilityMode Value="True"/>
</Flags>
<SessionStorage Value="InProjectDir"/>
<MainUnit Value="0"/>
<Title Value="JvId3v2Demo"/>
<ResourceType Value="res"/>
<UseXPManifest Value="True"/>

View File

@ -12,11 +12,11 @@ object JvID3v2EditForm: TJvID3v2EditForm
OnCreate = FormCreate
OnShow = FormShow
Position = poMainFormCenter
LCLVersion = '1.6.4.0'
LCLVersion = '2.1.0.0'
object lsbNavigator: TListBox
Left = 4
Height = 483
Top = 40
Height = 479
Top = 44
Width = 121
Align = alLeft
BorderSpacing.Left = 4
@ -33,10 +33,11 @@ object JvID3v2EditForm: TJvID3v2EditForm
end
object ToolBar1: TToolBar
Left = 0
Height = 40
Height = 44
Top = 0
Width = 599
ButtonHeight = 36
AutoSize = True
ButtonHeight = 42
ButtonWidth = 72
Caption = 'ToolBar1'
Images = iml16
@ -70,10 +71,10 @@ object JvID3v2EditForm: TJvID3v2EditForm
end
object Notebook1: TNotebook
Left = 125
Height = 487
Top = 40
Height = 483
Top = 44
Width = 474
PageIndex = 1
PageIndex = 0
Align = alClient
TabOrder = 2
object PgWinAmpTags: TPage

View File

@ -4,6 +4,9 @@
<Version Value="12"/>
<PathDelim Value="\"/>
<General>
<Flags>
<CompatibilityMode Value="True"/>
</Flags>
<SessionStorage Value="InProjectDir"/>
<Title Value="JvPicClipDemo"/>
<Scaled Value="True"/>
@ -14,8 +17,8 @@
</XPManifest>
<Icon Value="0"/>
</General>
<BuildModes>
<Item Name="Default" Default="True"/>
<BuildModes Count="1">
<Item1 Name="Default" Default="True"/>
</BuildModes>
<PublishOptions>
<Version Value="2"/>
@ -33,18 +36,18 @@
<PackageName Value="LCL"/>
</Item2>
</RequiredPackages>
<Units>
<Unit>
<Units Count="2">
<Unit0>
<Filename Value="JvPicClipDemo.lpr"/>
<IsPartOfProject Value="True"/>
</Unit>
<Unit>
</Unit0>
<Unit1>
<Filename Value="main.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="Form1"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
</Unit>
</Unit1>
</Units>
</ProjectOptions>
<CompilerOptions>

View File

@ -87,13 +87,11 @@ end;
procedure TForm1.CreateCombinedImage(ABitmap: TBitmap;
out ANumCols, ANumRows: Integer);
const
W = 24;
H = 24;
var
pic: TPicture;
c, r, i: Integer;
L: TStrings;
W, H: Integer;
begin
L := TStringList.Create;
try
@ -132,6 +130,16 @@ begin
L.Add('../design/JvCustomControls/images/tjvvalidateedit.png'); // 32
ANumCols := 8;
ANumRows := 4;
pic := TPicture.Create;
try
pic.LoadFromFile(L[0]);
W := pic.Width;
H := pic.Height;
finally
pic.Free;
end;
ABitmap.SetSize(ANumCols * W, ANumRows * H);
ABitmap.Canvas.Brush.Color := clWhite;
Abitmap.Canvas.FillRect(0, 0, ABitmap.Width, ABitmap.Height);

View File

@ -7,7 +7,7 @@ object MainForm: TMainForm
ClientHeight = 358
ClientWidth = 459
OnCreate = FormCreate
LCLVersion = '1.9.0.0'
LCLVersion = '2.1.0.0'
object Bevel1: TBevel
Left = 20
Height = 44
@ -15,9 +15,11 @@ object MainForm: TMainForm
Width = 176
end
object JvSpecialProgress1: TJvSpecialProgress
AnchorSideTop.Control = Bevel1
AnchorSideTop.Side = asrCenter
Left = 32
Height = 15
Top = 24
Top = 27
Width = 150
Caption = 'JvSpecialProgress1'
Position = 50

View File

@ -1,11 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<ProjectOptions>
<Version Value="11"/>
<Version Value="12"/>
<PathDelim Value="\"/>
<General>
<Flags>
<CompatibilityMode Value="True"/>
</Flags>
<SessionStorage Value="InProjectDir"/>
<MainUnit Value="0"/>
<Title Value="specialprogress_demo"/>
<Scaled Value="True"/>
<ResourceType Value="res"/>
@ -13,7 +15,6 @@
<XPManifest>
<DpiAware Value="True"/>
</XPManifest>
<Icon Value="0"/>
</General>
<BuildModes Count="1">
<Item1 Name="Default" Default="True"/>

View File

@ -110,7 +110,6 @@ type
protected
function CanAutoSize(var NewWidth, NewHeight: Integer): Boolean; override;
function GetPalette: HPALETTE; override;
procedure AdjustSize; override;
procedure BufferedPaint; override;
procedure DefineProperties(Filer: TFiler); override;
procedure DoPaintImage; override;
@ -121,6 +120,7 @@ type
public
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
procedure AdjustSize; override;
published
property Align;
property Anchors;
@ -306,9 +306,11 @@ begin
end;
function TJvImageControl.DoPaletteChange: Boolean;
{
var
ParentForm: TCustomForm;
Tmp: TGraphic;
}
begin
Result := False;
(*************** NOT CONVERTED ***

View File

@ -192,8 +192,7 @@ implementation
uses
TypInfo,
Math, // JclMath, // for EnsureRange
JvResources,
JvJCLUtils; // for TryStrToInt
JvResources;
{$R *.lfm}

View File

@ -79,7 +79,7 @@ type
procedure SetWantDrawBuffer(Value: Boolean);
protected
procedure Paint; override;
procedure KeyDown(var Key: Word; Shift: TShiftState); override;
procedure KeyDown(var Key: Word; {%H-}Shift: TShiftState); override;
procedure DoEnter; override;
procedure DoExit; override;
procedure MouseDown(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override;
@ -88,12 +88,12 @@ type
procedure DrawFocus;
procedure DrawFrame(X, Y: Integer);
procedure SetFullColor(const Value: TJvFullColor); virtual;
procedure MouseColor(Shift: TShiftState; X, Y: Integer); virtual;
procedure MouseColor({%H-}Shift: TShiftState; X, Y: Integer); virtual;
procedure AxisConfigChange; virtual;
procedure DrawBuffer; virtual;
procedure ColorSpaceChange; virtual;
procedure CalcSize; virtual;
procedure KeyMove(KeyCode: TJvKeyCode; MoveCount: Integer); virtual;
procedure KeyMove({%H-}KeyCode: TJvKeyCode; {%H-}MoveCount: Integer); virtual;
procedure InvalidateCursor; virtual; abstract;
property WantDrawBuffer: Boolean read FWantDrawBuffer write SetWantDrawBuffer;
property MouseDragging: Boolean read FMouseDragging;
@ -241,7 +241,7 @@ type
X, Y: Integer); override;
procedure MouseColor(Shift: TShiftState;
X, Y: Integer); override;
procedure KeyMove(KeyCode: TJvKeyCode; MoveCount: Integer); override;
procedure KeyMove({%H-}KeyCode: TJvKeyCode; {%H-}MoveCount: Integer); override;
procedure Notification(AComponent: TComponent; Operation: TOperation); override;
procedure TrackBarColorChange(Sender: TObject); override;
public
@ -669,7 +669,7 @@ type
procedure SetSelected(const Value: TJvFullColor);
procedure SetSelectedIndex(const Value: Integer);
procedure SetBrush(const Value: TBrush);
procedure MouseLeave(var Msg: TLMMouse); message LM_MOUSELEAVE;
// procedure MouseLeave(var Msg: TLMMouse); message LM_MOUSELEAVE;
procedure CMHintShow(var Msg: TLMessage); message CM_HINTSHOW;
protected
procedure Paint; override;
@ -765,7 +765,7 @@ function AxisConfigToString(AxisConfig: TJvFullColorAxisConfig;
ItemFormat: TJvFullColorAxisConfigFormat; AColorSpace: TJvColorSpace): string;
var
Str: string;
AxisConfigs: TJvFullColorAxisConfigs;
//AxisConfigs: TJvFullColorAxisConfigs;
begin
Str := GetEnumName(TypeInfo(TJvFullColorAxisConfig), Ord(AxisConfig));
case ItemFormat of
@ -774,7 +774,7 @@ begin
afIndent:
Result := Str;
else
AxisConfigs := TabAxisConfigs[AxisConfig];
//AxisConfigs := TabAxisConfigs[AxisConfig];
Result := Format('[%s] = %s ; [%s] = %s ; [%s] = %s',
[Str[3], AColorSpace.AxisName[axIndex0], Str[4],
AColorSpace.AxisName[axIndex1], Str[5], AColorSpace.AxisName[axIndex2]]);
@ -1175,6 +1175,7 @@ begin
// Delphi TColor is (MSB) 00BBGGRR (LSB)
// Line^[IndexX] := RGBToBGR(ConvertToColor(TempColor));
P^ := RGBToBGR(ConvertToColor(TempColor));
PColorRGBA(P)^.a := 255;
inc(P);
end;
end;
@ -1592,7 +1593,7 @@ begin
end;
// (outchy) don't remove, Bitmap colors are stocked as (MSB) 00RRGGBB (LSB)
// Delphi TColor is (MSB) 00BBGGRR (LSB)
Line^[X] := RGBToBGR(ConvertToColor(Magic1 or (Magic2 shl 8) or (Magic3 shl 16)));
Line^[X] := RGBToBGR(ConvertToColor(Magic1 or (Magic2 shl 8) or (Magic3 shl 16))) + $FF000000;
// P^ := RGBToBGR(ConvertToColor(Magic1 or (Magic2 shl 8) or (Magic3 shl 16)));
// inc(P);
end
@ -2843,6 +2844,7 @@ begin
spLeft:
begin
ShapeTop := (h - FShapeHeight) div 2;
ShapeLeft := 0;
TextLeft := FShapeWidth + FSpacing;
TextTop := (h - TextHeight(FCaption)) div 2;
end;
@ -3495,13 +3497,14 @@ begin
end;
end;
{
procedure TJvFullColorGroup.MouseLeave(var Msg: TLMMouse);
begin
FMouseIndex := -1;
Msg.Result := 1;
Refresh;
end;
}
{$IFDEF RTL200_UP}
// for D2009 "Use Controls.PHintInfo" warning
type
@ -3518,7 +3521,7 @@ var
AColorID: TJvFullColorSpaceID;
AColorSpace: TJvColorSpace;
begin
AHintInfo := PHintInfo(Msg.LParam);
AHintInfo := {%H-}PHintInfo(PtrInt(Msg.LParam));
ColorIndex := -1;
CalcRects(XPos, YPos, XInc, YInc);
@ -3691,7 +3694,7 @@ var
XOffset, YOffset, XInc, YInc: Integer;
X, Y: Integer;
lEdge: TJvFullColorEdge;
ClipRect: TRect;
lClipRect: TRect;
procedure BevelRect(const R: TRect; Style: TJvFullColorEdge;
FillStyle: TBrushStyle; FillColor: TColor);
@ -3738,7 +3741,7 @@ begin
Y := YOffset;
X := XOffset;
ClipRect := Canvas.ClipRect;
lClipRect := Canvas.ClipRect;
Index := 0;
while Index < Items.Count do
@ -3772,9 +3775,9 @@ begin
for IndexY := 0 to RowCount do
begin
Rectangle(
Max(ClipRect.Left, 1),
Max(lClipRect.Left, 1),
Max(Y - YInc + 1, 1),
Min(ClipRect.Right, Self.Width - 2),
Min(lClipRect.Right, Self.Width - 2),
Min(Y, Self.Height - 2)
);
X := XOffset;

View File

@ -164,7 +164,6 @@ type
implementation
uses
JvResources,
Controls, SysUtils, JvFullColorForm, JvFullColorCircleForm;
//=== { TJvFullColorDialog } =================================================

View File

@ -1,31 +1,32 @@
object JvFullColorFrm: TJvFullColorFrm
Left = 373
Height = 388
Height = 454
Top = 274
Width = 712
Width = 922
ActiveControl = ColorBox
AutoSize = True
BorderIcons = [biSystemMenu]
BorderStyle = bsDialog
Caption = 'Color Spaces Editor, Choose your color'
ClientHeight = 388
ClientWidth = 712
ClientHeight = 454
ClientWidth = 922
Color = clBtnFace
DesignTimePPI = 120
Font.Color = clWindowText
KeyPreview = True
OnCreate = FormCreate
OnShow = FormShow
LCLVersion = '2.1.0.0'
object LabelColorSpace: TLabel
AnchorSideLeft.Control = JvColorSpaceCombo
AnchorSideTop.Control = Owner
Left = 12
Height = 15
Top = 8
Width = 112
BorderSpacing.Top = 8
Left = 15
Height = 20
Top = 10
Width = 150
BorderSpacing.Top = 10
Caption = '&Current Color Space :'
Font.Color = clWindowText
ParentColor = False
ParentFont = False
end
object LabelDrawOld: TLabel
AnchorSideLeft.Side = asrBottom
@ -33,15 +34,17 @@ object JvFullColorFrm: TJvFullColorFrm
AnchorSideRight.Control = LabelDrawNew
AnchorSideBottom.Control = JvColorSpaceCombo
AnchorSideBottom.Side = asrBottom
Left = 270
Height = 23
Top = 27
Width = 61
Left = 338
Height = 36
Top = 35
Width = 76
Anchors = [akTop, akRight, akBottom]
AutoSize = False
BorderSpacing.Left = 16
BorderSpacing.Left = 20
Color = clBlack
Font.Color = clWindowText
ParentColor = False
ParentFont = False
Transparent = False
OnClick = LabelDrawOldClick
end
@ -53,115 +56,131 @@ object JvFullColorFrm: TJvFullColorFrm
AnchorSideRight.Side = asrBottom
AnchorSideBottom.Control = JvColorSpaceCombo
AnchorSideBottom.Side = asrBottom
Left = 331
Height = 23
Top = 27
Width = 61
Left = 414
Height = 36
Top = 35
Width = 76
Anchors = [akTop, akRight, akBottom]
AutoSize = False
Color = clWhite
Font.Color = clWindowText
ParentColor = False
ParentFont = False
Transparent = False
end
object LabelOld: TLabel
AnchorSideLeft.Control = LabelDrawOld
AnchorSideTop.Control = LabelColorSpace
Left = 270
Height = 15
Top = 8
Width = 22
Left = 338
Height = 20
Top = 10
Width = 29
Caption = 'Old:'
Font.Color = clWindowText
ParentColor = False
ParentFont = False
end
object LabelNew: TLabel
AnchorSideLeft.Control = LabelDrawNew
AnchorSideTop.Control = LabelColorSpace
Left = 331
Height = 15
Top = 8
Width = 27
Left = 414
Height = 20
Top = 10
Width = 36
Caption = 'New:'
Font.Color = clWindowText
ParentColor = False
ParentFont = False
end
object GroupBoxSettings: TGroupBox
AnchorSideLeft.Control = JvColorSpaceCombo
AnchorSideTop.Control = JvColorSpaceCombo
AnchorSideTop.Side = asrBottom
AnchorSideRight.Side = asrBottom
Left = 12
Height = 246
Top = 62
Width = 380
BorderSpacing.Top = 12
BorderSpacing.Right = 16
Left = 15
Height = 308
Top = 86
Width = 475
BorderSpacing.Top = 15
BorderSpacing.Right = 20
Caption = ' Settings ... '
ClientHeight = 226
ClientWidth = 376
ClientHeight = 290
ClientWidth = 467
Font.Color = clWindowText
ParentFont = False
TabOrder = 1
object LabelAxis0: TLabel
AnchorSideLeft.Control = GroupBoxSettings
AnchorSideTop.Control = GroupBoxSettings
Left = 16
Height = 15
Top = 4
Width = 55
Left = 20
Height = 20
Top = 5
Width = 75
Alignment = taRightJustify
BorderSpacing.Left = 16
BorderSpacing.Top = 4
BorderSpacing.Left = 20
BorderSpacing.Top = 5
Caption = 'LabelAxis0'
Font.Color = clWindowText
ParentColor = False
ParentFont = False
end
object LabelAxis1: TLabel
AnchorSideLeft.Control = LabelAxis0
AnchorSideTop.Control = ScrollBarAxis0
AnchorSideTop.Side = asrBottom
Left = 16
Height = 15
Top = 59
Width = 55
Left = 20
Height = 20
Top = 75
Width = 75
Alignment = taRightJustify
BorderSpacing.Top = 16
BorderSpacing.Top = 20
Caption = 'LabelAxis1'
Font.Color = clWindowText
ParentColor = False
ParentFont = False
end
object LabelAxis2: TLabel
AnchorSideLeft.Control = LabelAxis0
AnchorSideTop.Control = ScrollBarAxis1
AnchorSideTop.Side = asrBottom
Left = 16
Height = 15
Top = 114
Width = 55
Left = 20
Height = 20
Top = 145
Width = 75
Alignment = taRightJustify
BorderSpacing.Top = 16
BorderSpacing.Top = 20
Caption = 'LabelAxis2'
Font.Color = clWindowText
ParentColor = False
ParentFont = False
end
object LabelPredefined: TLabel
AnchorSideLeft.Control = ColorBox
AnchorSideTop.Control = ScrollBarAxis2
AnchorSideTop.Side = asrBottom
Left = 88
Height = 15
Top = 169
Width = 95
Left = 108
Height = 20
Top = 215
Width = 128
Alignment = taRightJustify
Caption = '&Predefined colors:'
FocusControl = ColorBox
Font.Color = clWindowText
ParentColor = False
ParentFont = False
end
object ScrollBarAxis0: TScrollBar
AnchorSideLeft.Control = LabelAxis0
AnchorSideTop.Control = LabelAxis0
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = SpinEditAxis0
Left = 16
Height = 20
Top = 23
Width = 268
Left = 20
Height = 25
Top = 30
Width = 332
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Top = 4
BorderSpacing.Right = 16
BorderSpacing.Top = 5
BorderSpacing.Right = 20
LargeChange = 16
Max = 255
PageSize = 0
@ -175,12 +194,12 @@ object JvFullColorFrm: TJvFullColorFrm
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = ScrollBarAxis0
AnchorSideRight.Side = asrBottom
Left = 16
Height = 20
Top = 78
Width = 268
Left = 20
Height = 25
Top = 100
Width = 332
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Top = 4
BorderSpacing.Top = 5
LargeChange = 16
Max = 255
PageSize = 0
@ -194,13 +213,13 @@ object JvFullColorFrm: TJvFullColorFrm
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = ScrollBarAxis1
AnchorSideRight.Side = asrBottom
Left = 16
Height = 20
Top = 133
Width = 268
Left = 20
Height = 25
Top = 170
Width = 332
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Top = 4
BorderSpacing.Bottom = 16
BorderSpacing.Top = 5
BorderSpacing.Bottom = 20
LargeChange = 16
Max = 255
PageSize = 0
@ -212,14 +231,16 @@ object JvFullColorFrm: TJvFullColorFrm
AnchorSideTop.Side = asrCenter
AnchorSideRight.Control = GroupBoxSettings
AnchorSideRight.Side = asrBottom
Left = 300
Height = 23
Top = 22
Width = 60
Left = 372
Height = 30
Top = 27
Width = 75
Anchors = [akTop, akRight]
BorderSpacing.Right = 16
BorderSpacing.Right = 20
Font.Color = clWindowText
MaxValue = 255
OnChange = SpinEditChange
ParentFont = False
TabOrder = 1
end
object SpinEditAxis1: TSpinEdit
@ -229,13 +250,15 @@ object JvFullColorFrm: TJvFullColorFrm
AnchorSideTop.Side = asrCenter
AnchorSideRight.Control = SpinEditAxis0
AnchorSideRight.Side = asrBottom
Left = 300
Height = 23
Top = 77
Width = 60
Left = 372
Height = 30
Top = 97
Width = 75
Anchors = [akTop, akLeft, akRight]
Font.Color = clWindowText
MaxValue = 255
OnChange = SpinEditChange
ParentFont = False
TabOrder = 3
end
object SpinEditAxis2: TSpinEdit
@ -245,13 +268,15 @@ object JvFullColorFrm: TJvFullColorFrm
AnchorSideTop.Side = asrCenter
AnchorSideRight.Control = SpinEditAxis0
AnchorSideRight.Side = asrBottom
Left = 300
Height = 23
Top = 132
Width = 60
Left = 372
Height = 30
Top = 167
Width = 75
Anchors = [akTop, akLeft, akRight]
Font.Color = clWindowText
MaxValue = 255
OnChange = SpinEditChange
ParentFont = False
TabOrder = 5
end
object ColorBox: TColorBox
@ -259,15 +284,17 @@ object JvFullColorFrm: TJvFullColorFrm
AnchorSideLeft.Side = asrCenter
AnchorSideTop.Control = LabelPredefined
AnchorSideTop.Side = asrBottom
Left = 88
Height = 22
Top = 188
Width = 201
Left = 108
Height = 36
Top = 240
Width = 251
Style = [cbStandardColors, cbExtendedColors, cbSystemColors, cbPrettyNames]
BorderSpacing.Top = 4
BorderSpacing.Bottom = 16
ItemHeight = 16
BorderSpacing.Top = 5
BorderSpacing.Bottom = 20
Font.Color = clWindowText
ItemHeight = 20
OnSelect = ComboBoxPredefinedSelect
ParentFont = False
TabOrder = 6
end
end
@ -279,16 +306,16 @@ object JvFullColorFrm: TJvFullColorFrm
AnchorSideRight.Side = asrBottom
AnchorSideBottom.Control = ButtonOK
AnchorSideBottom.Side = asrBottom
Left = 408
Height = 341
Top = 8
Width = 296
Left = 510
Height = 434
Top = 10
Width = 402
ColCount = 8
SquareSize = 30
OnChange = JvFullColorGroupChange
Anchors = [akTop, akLeft, akRight, akBottom]
BorderSpacing.Right = 8
Constraints.MinWidth = 288
BorderSpacing.Right = 10
Constraints.MinWidth = 360
ParentShowHint = False
ShowHint = True
end
@ -300,29 +327,33 @@ object JvFullColorFrm: TJvFullColorFrm
AnchorSideRight.Side = asrBottom
AnchorSideBottom.Control = ButtonOK
AnchorSideBottom.Side = asrBottom
Left = 408
Height = 341
Top = 8
Width = 296
Left = 510
Height = 434
Top = 10
Width = 402
Anchors = [akTop, akLeft, akRight, akBottom]
BorderSpacing.Right = 8
BorderSpacing.Right = 10
BevelInner = bvRaised
BevelOuter = bvLowered
ClientHeight = 341
ClientWidth = 296
ClientHeight = 434
ClientWidth = 402
Font.Color = clWindowText
ParentFont = False
TabOrder = 2
Visible = False
object LabelAxis: TLabel
AnchorSideLeft.Control = PanelGraphic
AnchorSideTop.Control = JvColorAxisConfigCombo
AnchorSideTop.Side = asrCenter
Left = 10
Height = 15
Top = 14
Width = 24
BorderSpacing.Left = 8
Left = 12
Height = 20
Top = 20
Width = 33
BorderSpacing.Left = 10
Caption = '&Axis:'
Font.Color = clWindowText
ParentColor = False
ParentFont = False
end
object JvColorPanel: TJvFullColorPanel
AnchorSideLeft.Control = PanelGraphic
@ -331,15 +362,15 @@ object JvFullColorFrm: TJvFullColorFrm
AnchorSideRight.Control = PanelGraphic
AnchorSideRight.Side = asrBottom
AnchorSideBottom.Control = JvFullColorTrackBar
Left = 10
Height = 263
Top = 37
Width = 268
Anchors = [akTop, akLeft, akBottom]
BorderSpacing.Left = 8
BorderSpacing.Top = 4
BorderSpacing.Right = 8
BorderSpacing.Bottom = 4
Left = 12
Height = 326
Top = 53
Width = 378
Anchors = [akTop, akLeft, akRight, akBottom]
BorderSpacing.Left = 10
BorderSpacing.Top = 5
BorderSpacing.Right = 10
BorderSpacing.Bottom = 5
FullColor = 83886079
TabOrder = 1
OnColorChange = JvColorPanelColorChange
@ -354,11 +385,12 @@ object JvFullColorFrm: TJvFullColorFrm
AnchorSideRight.Side = asrBottom
AnchorSideBottom.Control = PanelGraphic
AnchorSideBottom.Side = asrBottom
Left = 10
Height = 27
Top = 304
Width = 268
BorderSpacing.Bottom = 8
Left = 12
Height = 38
Top = 384
Width = 378
Anchors = [akLeft, akRight, akBottom]
BorderSpacing.Bottom = 10
FullColor = 83886079
TabOrder = 2
ArrowWidth = 8
@ -367,18 +399,19 @@ object JvFullColorFrm: TJvFullColorFrm
AnchorSideLeft.Control = LabelAxis
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = PanelGraphic
AnchorSideRight.Control = PanelGraphic
AnchorSideRight.Control = JvColorPanel
AnchorSideRight.Side = asrBottom
Left = 42
Height = 23
Top = 10
Width = 244
Left = 55
Height = 36
Top = 12
Width = 335
Selected = acXYZ
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Left = 8
BorderSpacing.Top = 8
BorderSpacing.Right = 8
ItemHeight = 15
BorderSpacing.Left = 10
BorderSpacing.Top = 10
Font.Color = clWindowText
ItemHeight = 22
ParentFont = False
TabOrder = 0
OnChange = ComboBoxAxisChange
end
@ -388,61 +421,70 @@ object JvFullColorFrm: TJvFullColorFrm
AnchorSideTop.Control = ButtonOK
AnchorSideRight.Control = GroupBoxSettings
AnchorSideRight.Side = asrBottom
Left = 284
Height = 25
Top = 324
Width = 108
Left = 366
Height = 30
Top = 414
Width = 124
Anchors = [akTop, akRight]
AutoSize = True
Caption = 'ButtonGraphics'
Constraints.MinWidth = 75
Constraints.MinWidth = 94
Font.Color = clWindowText
OnClick = ButtonGraphicsClick
ParentFont = False
TabOrder = 6
end
object ButtonOK: TButton
AnchorSideLeft.Control = GroupBoxSettings
AnchorSideTop.Control = GroupBoxSettings
AnchorSideTop.Side = asrBottom
Left = 12
Height = 25
Top = 324
Width = 75
Left = 15
Height = 30
Top = 414
Width = 94
AutoSize = True
BorderSpacing.Top = 16
BorderSpacing.Bottom = 8
BorderSpacing.Top = 20
BorderSpacing.Bottom = 10
Caption = '&OK'
Constraints.MinWidth = 75
Constraints.MinWidth = 94
Default = True
Font.Color = clWindowText
ModalResult = 1
ParentFont = False
TabOrder = 3
end
object ButtonCancel: TButton
AnchorSideLeft.Control = ButtonOK
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = ButtonOK
Left = 95
Height = 25
Top = 324
Width = 75
BorderSpacing.Left = 8
Left = 119
Height = 30
Top = 414
Width = 72
AutoSize = True
BorderSpacing.Left = 10
Cancel = True
Caption = 'Ca&ncel'
Font.Color = clWindowText
ModalResult = 2
ParentFont = False
TabOrder = 4
end
object ButtonApply: TButton
AnchorSideLeft.Control = ButtonCancel
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = ButtonOK
Left = 178
Height = 25
Top = 324
Width = 75
Left = 201
Height = 30
Top = 414
Width = 94
AutoSize = True
BorderSpacing.Left = 8
BorderSpacing.Left = 10
Caption = '&Apply'
Constraints.MinWidth = 75
Constraints.MinWidth = 94
Font.Color = clWindowText
OnClick = ButtonApplyClick
ParentFont = False
TabOrder = 5
end
object JvColorSpaceCombo: TJvFullColorSpaceCombo
@ -450,14 +492,16 @@ object JvFullColorFrm: TJvFullColorFrm
AnchorSideTop.Control = LabelColorSpace
AnchorSideTop.Side = asrBottom
AnchorSideRight.Side = asrBottom
Left = 12
Height = 23
Top = 27
Width = 244
BorderSpacing.Left = 12
BorderSpacing.Top = 4
Constraints.MinWidth = 210
ItemHeight = 15
Left = 15
Height = 36
Top = 35
Width = 305
BorderSpacing.Left = 15
BorderSpacing.Top = 5
Constraints.MinWidth = 262
Font.Color = clWindowText
ItemHeight = 22
ParentFont = False
TabOrder = 0
OnSelect = JvComboBoxColorSpaceSelect
end

View File

@ -120,7 +120,7 @@ type
implementation
uses
JvResources;
Math, JvResources;
{$R *.lfm}
@ -155,8 +155,15 @@ begin
end;
procedure TJvFullColorFrm.FormShow(Sender: TObject);
var
i, w: Integer;
begin
Position := poScreenCenter;
w := 0;
for i := 0 to JvColorAxisConfigCombo.Items.Count-1 do
w := Max(w, JvColorAxisConfigCombo.Canvas.TextWidth(JvColorAxisConfigCombo.Items[i]));
JvColorAxisConfigCombo.Constraints.MinWidth := w + 40;;
AutoSize := true;
end;
procedure TJvFullColorFrm.Loaded;

View File

@ -89,8 +89,6 @@ procedure RotateBitmap(SourceBitmap, DestBitmap: TBitmap; AColorDelta: TJvColorD
implementation
uses
JvTypes;
function RotateColor(AColor: TJvFullColor; AColorDelta: TJvColorDelta): TJvFullColor;
var
@ -175,7 +173,7 @@ end;
procedure RotateBitmap(SourceBitmap, DestBitmap: TBitmap; AColorDelta: TJvColorDelta);
type
TFullColorValue = array [TJvAxisIndex] of SmallInt;
PFullColorValue = ^TFullColorValue;
// PFullColorValue = ^TFullColorValue;
var
OriginalPixelFormat: TPixelFormat;
Colors: array [TJvAxisIndex,Byte] of TFullColorValue;
@ -275,7 +273,7 @@ begin
if ColorFusion[axIndex2] < 0 then
ColorFusion[axIndex2] := 0;
DestLine^ := // Bitmap Color Format is (MSB)0RGB(LSB)
(ColorFusion[axIndex0] shl 16) or (ColorFusion[axIndex1] shl 8) or (ColorFusion[axIndex2]);
(ColorFusion[axIndex0] shl 16) or (ColorFusion[axIndex1] shl 8) or (ColorFusion[axIndex2]); // or $FF000000;
Inc(SourceLine);
Inc(DestLine);
end;

View File

@ -102,10 +102,10 @@ type
private
FID: TJvFullColorSpaceID;
protected
function GetAxisName(Index: TJvAxisIndex): string; virtual;
function GetAxisMin(Index: TJvAxisIndex): Byte; virtual;
function GetAxisMax(Index: TJvAxisIndex): Byte; virtual;
function GetAxisDefault(Index: TJvAxisIndex): Byte; virtual;
function GetAxisName({%H-}Index: TJvAxisIndex): string; virtual;
function GetAxisMin({%H-}Index: TJvAxisIndex): Byte; virtual;
function GetAxisMax({%H-}Index: TJvAxisIndex): Byte; virtual;
function GetAxisDefault({%H-}Index: TJvAxisIndex): Byte; virtual;
function GetName: string; virtual;
function GetShortName: string; virtual;
function GetNumberOfColors: Cardinal; virtual;
@ -148,11 +148,11 @@ type
TJvRGBColorSpace = class(TJvColorSpace)
protected
function GetAxisName(Index: TJvAxisIndex): string; override;
function GetAxisMin(Index: TJvAxisIndex): Byte; override;
function GetAxisMax(Index: TJvAxisIndex): Byte; override;
function GetAxisMin({%H-}Index: TJvAxisIndex): Byte; override;
function GetAxisMax({%H-}Index: TJvAxisIndex): Byte; override;
function GetName: string; override;
function GetShortName: string; override;
function GetAxisDefault(Index: TJvAxisIndex): Byte; override;
function GetAxisDefault({%H-}Index: TJvAxisIndex): Byte; override;
public
function ConvertFromColor(AColor: TColor): TJvFullColor; override;
function ConvertToColor(AColor: TJvFullColor): TColor; override;
@ -161,11 +161,11 @@ type
TJvHLSColorSpace = class(TJvColorSpace)
protected
function GetAxisName(Index: TJvAxisIndex): string; override;
function GetAxisMin(Index: TJvAxisIndex): Byte; override;
function GetAxisMax(Index: TJvAxisIndex): Byte; override;
function GetAxisMin({%H-}Index: TJvAxisIndex): Byte; override;
function GetAxisMax({%H-}Index: TJvAxisIndex): Byte; override;
function GetName: string; override;
function GetShortName: string; override;
function GetAxisDefault(Index: TJvAxisIndex): Byte; override;
function GetAxisDefault({%H-}Index: TJvAxisIndex): Byte; override;
public
function ConvertFromColor(AColor: TColor): TJvFullColor; override;
function ConvertToColor(AColor: TJvFullColor): TColor; override;
@ -174,11 +174,11 @@ type
TJvCMYColorSpace = class(TJvColorSpace)
protected
function GetAxisName(Index: TJvAxisIndex): string; override;
function GetAxisMin(Index: TJvAxisIndex): Byte; override;
function GetAxisMax(Index: TJvAxisIndex): Byte; override;
function GetAxisMin({%H-}Index: TJvAxisIndex): Byte; override;
function GetAxisMax({%H-}Index: TJvAxisIndex): Byte; override;
function GetName: string; override;
function GetShortName: string; override;
function GetAxisDefault(Index: TJvAxisIndex): Byte; override;
function GetAxisDefault({%H-}Index: TJvAxisIndex): Byte; override;
public
function ConvertFromColor(AColor: TColor): TJvFullColor; override;
function ConvertToColor(AColor: TJvFullColor): TColor; override;
@ -187,11 +187,11 @@ type
TJvYUVColorSpace = class(TJvColorSpace)
protected
function GetAxisName(Index: TJvAxisIndex): string; override;
function GetAxisMin(Index: TJvAxisIndex): Byte; override;
function GetAxisMax(Index: TJvAxisIndex): Byte; override;
function GetAxisMin({%H-}Index: TJvAxisIndex): Byte; override;
function GetAxisMax({%H-}Index: TJvAxisIndex): Byte; override;
function GetName: string; override;
function GetShortName: string; override;
function GetAxisDefault(Index: TJvAxisIndex): Byte; override;
function GetAxisDefault({%H-}Index: TJvAxisIndex): Byte; override;
public
function ConvertFromColor(AColor: TColor): TJvFullColor; override;
function ConvertToColor(AColor: TJvFullColor): TColor; override;
@ -200,7 +200,7 @@ type
TJvHSVColorSpace = class(TJvColorSpace)
protected
function GetAxisName(Index: TJvAxisIndex): string; override;
function GetAxisMin(Index: TJvAxisIndex): Byte; override;
function GetAxisMin({%H-}Index: TJvAxisIndex): Byte; override;
function GetAxisMax(Index: TJvAxisIndex): Byte; override;
function GetName: string; override;
function GetShortName: string; override;
@ -213,11 +213,11 @@ type
TJvYIQColorSpace = class(TJvColorSpace)
protected
function GetAxisName(Index: TJvAxisIndex): string; override;
function GetAxisMin(Index: TJvAxisIndex): Byte; override;
function GetAxisMax(Index: TJvAxisIndex): Byte; override;
function GetAxisMin({%H-}Index: TJvAxisIndex): Byte; override;
function GetAxisMax({%H-}Index: TJvAxisIndex): Byte; override;
function GetName: string; override;
function GetShortName: string; override;
function GetAxisDefault(Index: TJvAxisIndex): Byte; override;
function GetAxisDefault({%H-}Index: TJvAxisIndex): Byte; override;
public
function ConvertFromColor(AColor: TColor): TJvFullColor; override;
function ConvertToColor(AColor: TJvFullColor): TColor; override;
@ -226,11 +226,11 @@ type
TJvYCCColorSpace = class(TJvColorSpace)
protected
function GetAxisName(Index: TJvAxisIndex): string; override;
function GetAxisMin(Index: TJvAxisIndex): Byte; override;
function GetAxisMax(Index: TJvAxisIndex): Byte; override;
function GetAxisMin({%H-}Index: TJvAxisIndex): Byte; override;
function GetAxisMax({%H-}Index: TJvAxisIndex): Byte; override;
function GetName: string; override;
function GetShortName: string; override;
function GetAxisDefault(Index: TJvAxisIndex): Byte; override;
function GetAxisDefault({%H-}Index: TJvAxisIndex): Byte; override;
public
function ConvertFromColor(AColor: TColor): TJvFullColor; override;
function ConvertToColor(AColor: TJvFullColor): TColor; override;
@ -239,11 +239,11 @@ type
TJvXYZColorSpace = class(TJvColorSpace)
protected
function GetAxisName(Index: TJvAxisIndex): string; override;
function GetAxisMin(Index: TJvAxisIndex): Byte; override;
function GetAxisMax(Index: TJvAxisIndex): Byte; override;
function GetAxisMin({%H-}Index: TJvAxisIndex): Byte; override;
function GetAxisMax({%H-}Index: TJvAxisIndex): Byte; override;
function GetName: string; override;
function GetShortName: string; override;
function GetAxisDefault(Index: TJvAxisIndex): Byte; override;
function GetAxisDefault({%H-}Index: TJvAxisIndex): Byte; override;
public
function ConvertFromColor(AColor: TColor): TJvFullColor; override;
function ConvertToColor(AColor: TJvFullColor): TColor; override;
@ -252,11 +252,11 @@ type
TJvLABColorSpace = class(TJvColorSpace)
protected
function GetAxisName(Index: TJvAxisIndex): string; override;
function GetAxisMin(Index: TJvAxisIndex): Byte; override;
function GetAxisMax(Index: TJvAxisIndex): Byte; override;
function GetAxisMin({%H-}Index: TJvAxisIndex): Byte; override;
function GetAxisMax({%H-}Index: TJvAxisIndex): Byte; override;
function GetName: string; override;
function GetShortName: string; override;
function GetAxisDefault(Index: TJvAxisIndex): Byte; override;
function GetAxisDefault({%H-}Index: TJvAxisIndex): Byte; override;
public
function ConvertFromColor(AColor: TColor): TJvFullColor; override;
function ConvertToColor(AColor: TJvFullColor): TColor; override;
@ -314,7 +314,7 @@ function ColorSpaceManager: TJvColorSpaceManager;
function GetAxisValue(AColor: TJvFullColor; AAxis: TJvAxisIndex): Byte;
function SetAxisValue(AColor: TJvFullColor; AAxis: TJvAxisIndex; NewValue: Byte): TJvFullColor;
procedure SplitColorParts(AColor: TJvFullColor; var Part1, Part2, Part3: Integer);
procedure SplitColorParts(AColor: TJvFullColor; out Part1, Part2, Part3: Integer);
function JoinColorParts(const Part1, Part2, Part3: Integer): TJvFullColor;
function ColorToPrettyName(Value: TColor): String;
@ -385,7 +385,7 @@ begin
end;
end;
procedure SplitColorParts(AColor: TJvFullColor; var Part1, Part2, Part3: Integer);
procedure SplitColorParts(AColor: TJvFullColor; out Part1, Part2, Part3: Integer);
begin
Part1 := AColor and $000000FF;
Part2 := (AColor shr 8) and $000000FF;
@ -460,7 +460,7 @@ end;
function TJvColorSpace.ConvertFromColor(AColor: TColor): TJvFullColor;
begin
Result := (AColor and $00FFFFFF) or (ID shl 24);
Result := (Cardinal(AColor) and $00FFFFFF) or (ID shl 24);
end;
function TJvColorSpace.ConvertToColor(AColor: TJvFullColor): TColor;

View File

@ -30,7 +30,7 @@ unit JvGradientHeaderPanel;
interface
uses
LMessages, Types,
LMessages,
SysUtils, Classes, Graphics, Controls, StdCtrls,
JvGradient, JvTypes, JvComponent;

View File

@ -125,7 +125,7 @@ begin
Exit;
Seek(-CTagSize, soFromEnd);
Result := (Read(TagID, CTagIDSize) = CTagIDSize) and (TagID = CID3v1Tag);
Result := (Read(TagID{%H-}, CTagIDSize) = CTagIDSize) and (TagID = CID3v1Tag);
finally
Free;
end;
@ -157,7 +157,7 @@ begin
try
Seek(-CTagSize, soFromEnd);
if (Read(TagID, CTagIDSize) = CTagIDSize) and (TagID = CID3v1Tag) then
if (Read(TagID{%H-}, CTagIDSize) = CTagIDSize) and (TagID = CID3v1Tag) then
Size := Size - CTagSize;
finally
Free;
@ -179,7 +179,7 @@ begin
if Size >= CTagSize then
begin
Seek(-CTagSize, soFromEnd);
if (Read(TagID, CTagIDSize) = CTagIDSize) and (TagID = CID3v1Tag) then
if (Read(TagID{%H-}, CTagIDSize) = CTagIDSize) and (TagID = CID3v1Tag) then
Seek(-CTagIDSize, soFromCurrent)
else
Seek(0, soFromEnd);
@ -248,7 +248,7 @@ begin
FNeedUpdateHasTag := True;
FillChar(lTag, CTagSize, #0);
FillChar(lTag{%H-}, CTagSize, #0);
// Set new Tag
Move(CID3v1Tag[0], lTag.Identifier[0], 3);
@ -318,7 +318,7 @@ var
begin
CheckActive;
Result := ReadID3v1Tag(FileName, lTag);
Result := ReadID3v1Tag(FileName, lTag{%H-});
FNeedUpdateHasTag := False;
FHasTag := Result;

View File

@ -296,7 +296,7 @@ type
procedure WriteFrameHeader(const AFrameSize: Cardinal);
procedure WriteID;
procedure ChangeToVersion(const ANewVersion: TJvID3Version); virtual;
procedure ChangeToVersion(const {%H-}ANewVersion: TJvID3Version); virtual;
function SupportsVersion(const AVersion: TJvID3Version): Boolean; virtual;
{ Checks whether this frame is empty, thus can be removed }
@ -310,7 +310,7 @@ type
procedure CheckFrameIDStr(const S: AnsiString);
{ Checks whether Frame has the same unique identifier as this frame }
function SameUniqueIDAs(const Frame: TJvID3Frame): Boolean; virtual;
function SameUniqueIDAs(const {%H-}Frame: TJvID3Frame): Boolean; virtual;
function MustWriteAsUTF: Boolean; virtual;
@ -329,8 +329,8 @@ type
const AFrameIDStr: AnsiString = ''); reintroduce; virtual;
destructor Destroy; override;
class function CanAddFrame(AController: TJvID3Controller; AFrameID: TJvID3FrameID): Boolean; virtual;
function CheckFrame(const HandleError: TJvID3HandleError): Boolean; virtual;
class function CanAddFrame({%H-}AController: TJvID3Controller; {%H-}AFrameID: TJvID3FrameID): Boolean; virtual;
function CheckFrame(const {%H-}HandleError: TJvID3HandleError): Boolean; virtual;
procedure Assign(Source: TPersistent); override;
procedure Clear; virtual;
@ -402,13 +402,13 @@ type
procedure ReadFrame; override;
procedure WriteFrame; override;
function GetFrameSize(const ToEncoding: TJvID3Encoding): Cardinal; override;
function GetFrameSize(const {%H-}ToEncoding: TJvID3Encoding): Cardinal; override;
function GetIsEmpty: Boolean; override;
function SameUniqueIDAs(const Frame: TJvID3Frame): Boolean; override;
public
class function CanAddFrame(AController: TJvID3Controller; AFrameID: TJvID3FrameID): Boolean; override;
function CheckFrame(const HandleError: TJvID3HandleError): Boolean; override;
function CheckFrame(const {%H-}HandleError: TJvID3HandleError): Boolean; override;
procedure Assign(Source: TPersistent); override;
procedure Clear; override;
@ -468,7 +468,7 @@ type
public
class function CanAddFrame(AController: TJvID3Controller; AFrameID: TJvID3FrameID): Boolean; override;
function CheckFrame(const HandleError: TJvID3HandleError): Boolean; override;
function CheckFrame(const {%H-}HandleError: TJvID3HandleError): Boolean; override;
procedure Assign(Source: TPersistent); override;
procedure Clear; override;
@ -562,7 +562,7 @@ type
function SameUniqueIDAs(const Frame: TJvID3Frame): Boolean; override;
public
class function CanAddFrame(AController: TJvID3Controller; AFrameID: TJvID3FrameID): Boolean; override;
function CheckFrame(const HandleError: TJvID3HandleError): Boolean; override;
function CheckFrame(const {%H-}HandleError: TJvID3HandleError): Boolean; override;
procedure Assign(Source: TPersistent); override;
procedure Clear; override;
@ -599,13 +599,13 @@ type
procedure ReadFrame; override;
procedure WriteFrame; override;
function GetFrameSize(const ToEncoding: TJvID3Encoding): Cardinal; override;
function GetFrameSize(const {%H-}ToEncoding: TJvID3Encoding): Cardinal; override;
function GetIsEmpty: Boolean; override;
function SameUniqueIDAs(const Frame: TJvID3Frame): Boolean; override;
public
class function CanAddFrame(AController: TJvID3Controller; AFrameID: TJvID3FrameID): Boolean; override;
function CheckFrame(const HandleError: TJvID3HandleError): Boolean; override;
function CheckFrame(const {%H-}HandleError: TJvID3HandleError): Boolean; override;
procedure Assign(Source: TPersistent); override;
procedure Clear; override;
@ -633,14 +633,14 @@ type
procedure ReadFrame; override;
procedure WriteFrame; override;
function GetFrameSize(const ToEncoding: TJvID3Encoding): Cardinal; override;
function GetFrameSize(const {%H-}ToEncoding: TJvID3Encoding): Cardinal; override;
function GetIsEmpty: Boolean; override;
function SameUniqueIDAs(const Frame: TJvID3Frame): Boolean; override;
public
class function CanAddFrame(AController: TJvID3Controller;
AFrameID: TJvID3FrameID): Boolean; override;
function CheckFrame(const HandleError: TJvID3HandleError): Boolean; override;
function CheckFrame(const {%H-}HandleError: TJvID3HandleError): Boolean; override;
procedure Assign(Source: TPersistent); override;
procedure Clear; override;
@ -667,7 +667,7 @@ type
procedure ReadFrame; override;
procedure WriteFrame; override;
function GetFrameSize(const ToEncoding: TJvID3Encoding): Cardinal; override;
function GetFrameSize(const {%H-}ToEncoding: TJvID3Encoding): Cardinal; override;
function GetIsEmpty: Boolean; override;
function SameUniqueIDAs(const Frame: TJvID3Frame): Boolean; override;
@ -747,7 +747,7 @@ type
function SameUniqueIDAs(const Frame: TJvID3Frame): Boolean; override;
public
class function CanAddFrame(AController: TJvID3Controller; AFrameID: TJvID3FrameID): Boolean; override;
function CheckFrame(const HandleError: TJvID3HandleError): Boolean; override;
function CheckFrame(const {%H-}HandleError: TJvID3HandleError): Boolean; override;
procedure Assign(Source: TPersistent); override;
procedure Clear; override;
@ -914,7 +914,7 @@ type
//procedure SetText(const ANewText: WideString); override;
procedure ChangeToVersion(const ANewVersion: TJvID3Version); override;
public
function CheckFrame(const HandleError: TJvID3HandleError): Boolean; override;
function CheckFrame(const {%H-}HandleError: TJvID3HandleError): Boolean; override;
class function Find(AController: TJvID3Controller; const AFrameID: TJvID3FrameID): TJvID3TimestampFrame;
class function FindOrCreate(AController: TJvID3Controller; const AFrameID: TJvID3FrameID): TJvID3TimestampFrame;
published
@ -947,7 +947,7 @@ type
procedure ReadFrame; override;
procedure WriteFrame; override;
function GetFrameSize(const ToEncoding: TJvID3Encoding): Cardinal; override;
function GetFrameSize(const {%H-}ToEncoding: TJvID3Encoding): Cardinal; override;
function GetIsEmpty: Boolean; override;
function SameUniqueIDAs(const Frame: TJvID3Frame): Boolean; override;
@ -984,7 +984,7 @@ type
function MustWriteAsUTF: Boolean; override;
public
class function CanAddFrame(AController: TJvID3Controller; AFrameID: TJvID3FrameID): Boolean; override;
function CheckFrame(const HandleError: TJvID3HandleError): Boolean; override;
function CheckFrame(const {%H-}HandleError: TJvID3HandleError): Boolean; override;
procedure Assign(Source: TPersistent); override;
procedure Clear; override;
@ -1084,7 +1084,7 @@ type
constructor Create(Controller: TJvID3Controller);
destructor Destroy; override;
procedure BeginDesign;
procedure ID3Event(Event: TJvID3Event; Info: Longint); virtual;
procedure ID3Event({%H-}Event: TJvID3Event; {%H-}Info: Longint); virtual;
procedure EndDesign;
property Controller: TJvID3Controller read FController;
end;
@ -1235,7 +1235,7 @@ function NiceGenreToGenre(const ANiceGenre: string): string;
implementation
uses
Graphics, Math, LazUTF8, LConvEncoding, LazFileUtils, DateUtils, StrUtils,
Graphics, Math, LazUTF8, LConvEncoding, LazFileUtils, DateUtils,
(*
{$IFDEF HAS_UNIT_ANSISTRINGS}
AnsiStrings,
@ -1454,7 +1454,8 @@ begin
end;
end;
function CheckIsURL(Frame: TJvID3Frame; var S: AnsiString; const HandleError: TJvID3HandleError): Boolean;
function CheckIsURL({%H-}Frame: TJvID3Frame; var {%H-}S: AnsiString;
const {%H-}HandleError: TJvID3HandleError): Boolean;
begin
{ Not implemented }
Result := True;
@ -1541,7 +1542,7 @@ function CheckMaxCharCount(Frame: TJvID3Frame; var S: String;
const HandleError: TJvID3HandleError): Boolean;
begin
//Result := CharCount(S) <= MaxCharCount;
Result := UTF8Length(S) <= MaxCharCount;
Result := Cardinal(UTF8Length(S)) <= MaxCharCount;
if not Result then
case HandleError of
heAutoCorrect:
@ -1553,7 +1554,7 @@ end;
{function GetID3Date(const S: WideString; const Encoding: TJvID3Encoding;
const Year: Word = 0): TDateTime; }
function GetID3Date(const S: String; const Encoding: TJvID3Encoding;
function GetID3Date(const S: String; const {%H-}Encoding: TJvID3Encoding;
const Year: Word = 0): TDateTime;
var
Day, Month: Word;
@ -1582,10 +1583,6 @@ begin
}
end;
{
function CheckIsLanguageList(Frame: TJvID3Frame;
Strings: {$IFDEF COMPILER12_UP}TStrings{$ELSE}JclUnicode.TWideStrings{$ENDIF COMPILER12_UP};
const HandleError: TJvID3HandleError): Boolean; }
function CheckIsLanguageList(Frame: TJvID3Frame; Strings: TStrings;
const HandleError: TJvID3HandleError): Boolean;
var
@ -1607,11 +1604,6 @@ begin
end;
end;
{
function CheckList(Frame: TJvID3Frame;
Strings: {$IFDEF COMPILER12_UP}TStrings{$ELSE}JclUnicode.TWideStrings{$ENDIF COMPILER12_UP};
const ASeparator: WideChar;
const HandleError: TJvID3HandleError): Boolean; }
function CheckList(Frame: TJvID3Frame; Strings: TStrings;
const ASeparator: WideChar; const HandleError: TJvID3HandleError): Boolean;
var
@ -1649,7 +1641,7 @@ end;
{function GetID3Time(const S: WideString; const Encoding: TJvID3Encoding;
const Sec: Word = 0; MSec: Word = 0): TDateTime; }
function GetID3Time(const S: String; const Encoding: TJvID3Encoding;
function GetID3Time(const S: String; const {%H-}Encoding: TJvID3Encoding;
const Sec: Word = 0; MSec: Word = 0): TDateTime;
var
Hour, Min: Word;
@ -1802,11 +1794,11 @@ begin
for I := 0 to SourceSize - 1 do
begin
Dest := Dest shl 7;
Dest := Dest or (TBytes(Source)[I] and $7F); // $7F = %01111111
Dest := Dest or Cardinal(TBytes(Source)[I] and $7F); // $7F = %01111111
end;
end;
procedure UnSyncSafe(var Source; const SourceSize: Integer; var Dest: Int64); overload;
procedure UnSyncSafe(var Source; const SourceSize: Integer; out Dest: Int64); overload;
type
TBytes = array [0..MaxInt - 1] of Byte;
var
@ -1824,8 +1816,6 @@ begin
end;
{procedure ExtractFixedStrings(const Content: WideString; const ALength: Integer;
Strings: {$IFDEF COMPILER12_UP}TStrings{$ELSE}JclUnicode.TWideStrings{$ENDIF COMPILER12_UP}); }
procedure ExtractFixedStrings(const Content: String; const ALength: Integer;
Strings: TStrings);
var
@ -1874,8 +1864,6 @@ begin
end;
end;
{ procedure ExtractStrings(Separator: WideChar; const Content: WideString;
Strings: {$IFDEF COMPILER12_UP}TStrings{$ELSE}JclUnicode.TWideStrings{$ENDIF COMPILER12_UP}); }
procedure ExtractStrings(Separator: WideChar; const Content: String;
Strings: TStrings);
var
@ -1923,14 +1911,13 @@ function GetTagSizeInclHeader(AStream: TStream): Cardinal;
var
Header: TID3v2HeaderRec;
begin
if (AStream.Read(Header, SizeOf(Header)) = SizeOf(Header)) and
Result := 0;
if (AStream.Read(Header{%H-}, SizeOf(Header)) = SizeOf(Header)) and
(Header.Identifier = cID3HeaderId) then
begin
UnSyncSafe(Header.Size, 4, Result);
Inc(Result, 10);
end
else
Result := 0;
end;
end;
procedure ChangeTagSize(const SourceFileName: string;
@ -1994,7 +1981,7 @@ begin
while True do
begin
BytesRead := AStream.Read(LBuffer, CBufferSize);
BytesRead := AStream.Read(LBuffer{%H-}, CBufferSize);
if BytesRead = 0 then
begin
Result := -1;
@ -2005,7 +1992,7 @@ begin
begin
if LastWasFF and (LBuffer[I] and $E0 = $E0) then
begin
Inc(Result, I - 1);
Inc(Result, Int64(I) - 1);
if (I + BufferSize - 1 >= BytesRead) or (I = 0) then
begin
AStream.Seek(Result, soBeginning);
@ -2069,7 +2056,7 @@ begin
while BytesToRead > 0 do
begin
{ Read at max CBufferSize bytes from the stream }
BytesRead := Source.Read(SourceBuf[0], Min(MaxBufSize, BytesToRead));
BytesRead := Source.Read({%H-}SourceBuf[0], Min(MaxBufSize, BytesToRead));
if BytesRead = 0 then
ID3Error(RsECouldNotReadData);
@ -2342,7 +2329,7 @@ var
begin
with TFileStream.Create(AFileName, fmOpenRead or fmShareDenyWrite) do
try
HasTag := (Read(Header, SizeOf(Header)) = SizeOf(Header)) and
HasTag := (Read(Header{%H-}, SizeOf(Header)) = SizeOf(Header)) and
(Header.Identifier = cID3HeaderId);
if not HasTag then
Exit;
@ -2499,7 +2486,7 @@ end;
class function TJvID3AudioEncryptionFrame.Find(AController: TJvID3Controller;
const AOwnerID: AnsiString): TJvID3AudioEncryptionFrame;
var
Frame: TJvID3Frame;
Frame: TJvID3Frame = nil;
begin
Result := nil;
if not Assigned(AController) or not AController.Active then
@ -3768,7 +3755,7 @@ begin
if Header.HasTag then
FFileInfo.Read(AStream, 10 + Header.Size)
else
{%H-}else
FFileInfo.Read(AStream, 0);
finally
EndReading;
@ -3841,7 +3828,7 @@ var
NewTagSizeInclHeader := ANewTagSizeInclHeaderExclPadding + Result;
{ Round to multiple of CChunk }
NewTagSizeInclHeader := ((NewTagSizeInclHeader + CChunk - 1) div CChunk) * CChunk;
NewTagSizeInclHeader := ((NewTagSizeInclHeader + CChunk {%H-}- 1) div CChunk) * CChunk;
Result := NewTagSizeInclHeader - ANewTagSizeInclHeaderExclPadding;
end;
@ -4140,7 +4127,7 @@ end;
procedure TJvID3CustomTextFrame.ReadFrame;
var
//S: WideString;
S: String;
S: String = '';
begin
with Stream do
begin
@ -4380,7 +4367,8 @@ const
CMinBytes: array [TJvID3Encoding] of Byte = (2, 4, 4, 2);
var
//S1, S2: WideString;
S1, S2: String;
S1: String = '';
S2: String = '';
begin
with Stream do
begin
@ -4510,9 +4498,9 @@ end;
procedure TJvID3ExtendedHeader.Read;
var
LSize: Cardinal;
LFlag: Byte;
FlagDataLength: Byte;
LSize: Cardinal = 0;
LFlag: Byte = 0;
FlagDataLength: Byte = 0;
begin
Reset;
@ -4967,7 +4955,7 @@ const
VBRTag_Info: array [0..3] of AnsiChar = AnsiString('Info'); { Do not change case }
FRAMES_FLAG = $0001;
BYTES_FLAG = $0002;
TOC_FLAG = $0004;
//TOC_FLAG = $0004;
var
HeadFlags: Integer;
begin
@ -5022,7 +5010,7 @@ var
begin
Reset;
FHeaderFoundAt := SearchSync(AStream, Offset, MPEGTag, CMPEGTagSize);
FHeaderFoundAt := SearchSync(AStream, Offset, MPEGTag{%H-}, CMPEGTagSize);
if FHeaderFoundAt < 0 then
Exit;
@ -5036,7 +5024,7 @@ begin
begin
{ Need to determine if the file has an ID3v1 tag }
AStream.Seek(-CTagSize, soFromEnd);
FHasID3v1Tag := (AStream.Read(TagID, CTagIDSize) = CTagIDSize) and (TagID = CID3v1Tag);
FHasID3v1Tag := (AStream.Read(TagID{%H-}, CTagIDSize) = CTagIDSize) and (TagID = CID3v1Tag);
end;
{ We now know enough to calculate the rest }
@ -5291,7 +5279,8 @@ end;
procedure TJvID3Frame.ReadFrameHeader;
var
Flag0, Flag1: Byte;
Flag0: Byte = 0;
Flag1: Byte = 0;
begin
case Controller.Version of
ive2_2:
@ -5811,7 +5800,7 @@ end;
function TJvID3Frames.CheckIsUnique(Frame: TJvID3Frame): Boolean;
var
FoundFrame: TJvID3Frame;
FoundFrame: TJvID3Frame = nil;
begin
Result := True;
if not Assigned(Frame) then
@ -5900,7 +5889,7 @@ begin
Result := TJvID3Frame(FList[Index]);
end;
function TJvID3Frames.GetFrameIDs: TJvID3FrameIDs;
function TJvID3Frames.{%H-}GetFrameIDs: TJvID3FrameIDs;
begin
end;
@ -6063,7 +6052,7 @@ end;
class function TJvID3GeneralObjFrame.Find(AController: TJvID3Controller;
const AContentDescription: String): TJvID3GeneralObjFrame;
var
Frame: TJvID3Frame;
Frame: TJvID3Frame = nil;
begin
Result := nil;
if not Assigned(AController) or not AController.Active then
@ -6282,7 +6271,7 @@ begin
begin
BeginReadFrame(10);
try
if Read(Header, 10) <> 10 then
if Read(Header{%H-}, 10) <> 10 then
Exit;
FHasTag := Header.Identifier = cID3HeaderId;
@ -6359,7 +6348,7 @@ begin
if Self.FSize > $0FFFFFFF then // 28 bits = 256 MB
ID3Error(RsETagTooBig, Controller);
FillChar(Header, SizeOf(Header), #0);
FillChar(Header{%H-}, SizeOf(Header), #0);
with Stream do
begin
@ -6817,7 +6806,7 @@ end;
class function TJvID3PictureFrame.Find(AController: TJvID3Controller;
const AType: TJvID3PictureType): TJvID3PictureFrame;
var
Frame: TJvID3Frame;
Frame: TJvID3Frame = nil;
begin
Result := nil;
if not Assigned(AController) or not AController.Active then
@ -6886,7 +6875,7 @@ end;
procedure TJvID3PictureFrame.ReadFrame;
var
LPictureType: Byte;
LPictureType: Byte = 0;
begin
{ Text encoding $xx
MIME type <text string> $00
@ -7138,7 +7127,7 @@ end;
class function TJvID3PopularimeterFrame.Find(AController: TJvID3Controller;
const AEmailAddress: AnsiString): TJvID3PopularimeterFrame;
var
Frame: TJvID3Frame;
Frame: TJvID3Frame = nil;
begin
Result := nil;
if not Assigned(AController) or not AController.Active then
@ -7465,7 +7454,7 @@ const
cMinBytes: array [TJvID3Encoding] of Byte = (2, 4, 4, 2);
var
//S: WideString;
S: String;
S: String = '';
begin
if IsNullSeparator then
begin
@ -7597,7 +7586,7 @@ end;
function TJvID3Stream.GetBytesTillEndOfFrame: Longint;
begin
Result := FStartPosition + FCurrentFrameSize - Position;
Result := Int64(FStartPosition) + FCurrentFrameSize - Position;
end;
function TJvID3Stream.GetBytesTillEndOfTag: Longint;
@ -7697,7 +7686,7 @@ end;
function TJvID3Stream.ReadEnc(var AEncoding: TJvID3Encoding): Longint;
var
B: Byte;
B: Byte = 0;
begin
Result := Read(B, 1);
if B <= Integer(High(TJvID3Encoding)) then
@ -7796,8 +7785,8 @@ end;
//function TJvID3Stream.ReadStringEnc(var S: WideString): Longint;
function TJvID3Stream.ReadStringEnc(var S: String): LongInt;
var
SA: AnsiString;
SW: WideString;
SA: AnsiString = '';
SW: WideString = '';
begin
case SourceEncoding of
ienISO_8859_1:
@ -7836,7 +7825,7 @@ end;
function TJvID3Stream.ReadStringW(var SW: WideString): Longint;
var
Order: WideChar;
Order: WideChar = #0;
P: PWideChar;
StartPos: PAnsiChar;
TerminatorFound: Boolean;
@ -7919,7 +7908,7 @@ end;
function TJvID3Stream.ReadSyncSafeInteger(var AInt: Cardinal): Longint;
var
Value: Cardinal;
Value: Cardinal = 0;
begin
Result := Read(Value, 4);
UnSyncSafe(Value, 4, AInt);
@ -7928,8 +7917,10 @@ end;
//function TJvID3Stream.ReadUserString(var S1, S2: WideString): Longint;
function TJvID3Stream.ReadUserString(var S1, S2: String): LongInt;
var
SA1, SA2: AnsiString;
SW1, SW2: WideString;
SA1: AnsiString = '';
SA2: AnsiString = '';
SW1: WideString = '';
SW2: WideString = '';
begin
case SourceEncoding of
ienISO_8859_1:
@ -8183,7 +8174,7 @@ end;
function TJvID3Stream.WriteSyncSafeInteger(const AInt: Cardinal): Longint;
var
Value: Cardinal;
Value: Cardinal = 0;
begin
SyncSafe(AInt, Value, 4);
Result := Write(Value, 4);
@ -8724,7 +8715,7 @@ begin
// S := UTF16ToAnsiString(Copy(ANewText, 1, 19));
S := Copy(ANewText, 1, 19);
FillChar(TimeArray, SizeOf(TimeArray), #0);
FillChar(TimeArray{%H-}, SizeOf(TimeArray), #0);
TimeArray[tkMonth] := 1;
TimeArray[tkDay] := 1;
@ -8939,7 +8930,7 @@ class function TJvID3URLUserFrame.Find(AController: TJvID3Controller;
const AIndex: Integer): TJvID3URLUserFrame;
var
FoundIndex: Integer;
Frame: TJvID3Frame;
Frame: TJvID3Frame = nil;
begin
Result := nil;
if not Assigned(AController) or not AController.Active then
@ -9071,7 +9062,7 @@ class function TJvID3UserFrame.Find(AController: TJvID3Controller;
const AIndex: Integer): TJvID3UserFrame;
var
FoundIndex: Integer;
Frame: TJvID3Frame;
Frame: TJvID3Frame = nil;
begin
Result := nil;

View File

@ -231,7 +231,7 @@ function ID3_StringToFrameID(const S: AnsiString): TJvID3FrameID;
function ID3_FrameIDToString(const ID: TJvID3FrameID; const Size: Integer = 4): AnsiString;
{ Genre procedures }
function ID3_GenreToID(const AGenre: string; const InclWinampGenres: Boolean = True): Integer;
function ID3_GenreToID(const AGenre: string; const {%H-}InclWinampGenres: Boolean = True): Integer;
{ searches for a genre that is a prefix for AGenreLong }
function ID3_LongGenreToID(const ALongGenre: string; const InclWinampGenres: Boolean = True): Integer;
function ID3_IDToGenre(const ID: Integer; const InclWinampGenres: Boolean = True): string;
@ -258,7 +258,6 @@ uses
AnsiStrings,
{$ENDIF HAS_UNIT_ANSISTRINGS}
*)
JvJCLUtils,
JvConsts, JvResources, JvTypes;
type

View File

@ -232,14 +232,14 @@ end;
procedure TJvPicClip.CheckIndex(Index: Integer);
begin
if (Index >= Cols * Rows) or (Index < 0) then
if (Index >= Integer(Cols) * Rows) or (Index < 0) then
raise EListError.CreateResFmt(@SListIndexError, [Index]);
end;
function TJvPicClip.GetIndex(Col, Row: Cardinal): Integer;
begin
Result := Col + (Row * Cols);
if (Result >= Cols * Rows) or IsEmpty then
if (Result >= Integer(Cols) * Rows) or IsEmpty then
Result := -1;
end;

View File

@ -661,7 +661,7 @@ begin
PaintText;
PaintRectangle;
Repaint;
Invalidate;
end;
procedure TJvSpecialProgress.UpdateBlock;