diff --git a/Demo/Images/ComponentEditorFMX.jpg b/Demo/Images/ComponentEditorFMX.jpg index 7f8d78a9..07813815 100644 Binary files a/Demo/Images/ComponentEditorFMX.jpg and b/Demo/Images/ComponentEditorFMX.jpg differ diff --git a/Demo/Images/DemoFMX.jpg b/Demo/Images/DemoFMX.jpg index 89a307cb..ff7c1531 100644 Binary files a/Demo/Images/DemoFMX.jpg and b/Demo/Images/DemoFMX.jpg differ diff --git a/Demo/Images/SampleFMX.jpg b/Demo/Images/SampleFMX.jpg index 6c5a4876..f6a7b824 100644 Binary files a/Demo/Images/SampleFMX.jpg and b/Demo/Images/SampleFMX.jpg differ diff --git a/Demo/Source/UMainFMX.fmx b/Demo/Source/UMainFMX.fmx index 0cf11598..51b0a62c 100644 --- a/Demo/Source/UMainFMX.fmx +++ b/Demo/Source/UMainFMX.fmx @@ -60,7 +60,7 @@ object SVGIconImageListForm: TSVGIconImageListForm IsChecked = True Position.X = 8.000000000000000000 Position.Y = 88.000000000000000000 - TabOrder = 7 + TabOrder = 9 Text = 'AutoSize' OnChange = AutoSizeCheckBoxChange end @@ -84,17 +84,6 @@ object SVGIconImageListForm: TSVGIconImageListForm Text = 'Show Editor...' OnClick = ShowEditorButtonClick end - object SpinBox1: TSpinBox - Touch.InteractiveGestures = [LongTap, DoubleTap] - TabOrder = 8 - Cursor = crIBeam - DecimalDigits = 0 - Max = 1200.000000000000000000 - Value = 32.000000000000000000 - Position.X = 208.000000000000000000 - Position.Y = 16.000000000000000000 - OnChange = SpinBox1Change - end object GrayScaleCheckBox: TCheckBox Position.X = 121.000000000000000000 Position.Y = 88.000000000000000000 @@ -102,6 +91,30 @@ object SVGIconImageListForm: TSVGIconImageListForm Text = 'GrayScale' OnChange = GrayScaleCheckBoxChange end + object ZoomSpinBox: TSpinBox + Touch.InteractiveGestures = [LongTap, DoubleTap] + TabOrder = 8 + Cursor = crIBeam + DecimalDigits = 0 + Min = 10.000000000000000000 + Value = 100.000000000000000000 + Position.X = 205.000000000000000000 + Position.Y = 18.000000000000000000 + Size.Width = 80.000000000000000000 + Size.Height = 22.000000000000000000 + Size.PlatformDefault = False + OnChange = ZoomSpinBoxChange + end + object ZoomLabel: TLabel + Position.X = 206.000000000000000000 + Position.Y = 2.000000000000000000 + Size.Width = 83.000000000000000000 + Size.Height = 17.000000000000000000 + Size.PlatformDefault = False + Text = 'Zoom %' + TabOrder = 7 + TabStop = False + end end object ImageView: TListBox Align = Left @@ -193,7 +206,6 @@ object SVGIconImageListForm: TSVGIconImageListForm Size = 16 end> IconName = 'business' - Opacity = 1.000000000000000000 SVGText = ''#13#10' '#13#10' '#13#10''#13#10 + Opacity = 1.000000000000000000 end item MultiResBitmap = < @@ -211,7 +224,6 @@ object SVGIconImageListForm: TSVGIconImageListForm Size = 16 end> IconName = 'business_contact' - Opacity = 1.000000000000000000 SVGText = ''#13#10' '#13#10' '#13#10' ' + ' '#13#10' ' + ' '#13#10''#13#10 + Opacity = 1.000000000000000000 end item MultiResBitmap = < @@ -229,7 +242,6 @@ object SVGIconImageListForm: TSVGIconImageListForm Size = 113 end> IconName = 'businessman' - Opacity = 1.000000000000000000 SVGText = ''#13#10' '#13#10' '#13#10''#13#10 + Opacity = 1.000000000000000000 end item MultiResBitmap = < @@ -253,7 +266,6 @@ object SVGIconImageListForm: TSVGIconImageListForm Size = 96 end> IconName = 'businesswoman' - Opacity = 1.000000000000000000 SVGText = ''#13#10' '#13#10' '#13#10' '#13#10''#13#10 + Opacity = 1.000000000000000000 end item MultiResBitmap = < @@ -274,7 +287,6 @@ object SVGIconImageListForm: TSVGIconImageListForm Size = 294 end> IconName = 'calculator' - Opacity = 1.000000000000000000 SVGText = ''#13#10' '#13#10' '#13#10' <' + '/g>'#13#10''#13#10 + Opacity = 1.000000000000000000 end item MultiResBitmap = < item + Size = 64 end> IconName = 'calendar' - Opacity = 1.000000000000000000 SVGText = ''#13#10' '#13#10' '#13#10' ' + ' '#13#10' '#13#10''#13#10 - end> - Destination = < + Opacity = 1.000000000000000000 + end item - Layers = < + MultiResBitmap = < item - Name = 'business' + Size = 64 end> + IconName = 'about' + SVGText = + ''#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10''#13#10 + Opacity = 1.000000000000000000 end item - Layers = < + MultiResBitmap = < item - Name = 'business_contact' + Size = 64 end> + IconName = 'accept_database' + SVGText = + ''#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10''#13#10 + Opacity = 1.000000000000000000 end item - Layers = < + MultiResBitmap = < item - Name = 'businessman' - SourceRect.Right = 113.000000000000000000 - SourceRect.Bottom = 113.000000000000000000 + Size = 64 end> + IconName = 'add_column' + SVGText = + ''#13#10' '#13#10' '#13#10' ' + + #13#10' '#13#10' <' + + 'rect x="32" y="36" width="12" height="4"/>'#13#10' '#13#10''#13#10 + Opacity = 1.000000000000000000 end item - Layers = < + MultiResBitmap = < item - Name = 'businesswoman' - SourceRect.Right = 96.000000000000000000 - SourceRect.Bottom = 96.000000000000000000 + Size = 64 end> + IconName = 'add_database' + SVGText = + ''#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10''#13#10 + Opacity = 1.000000000000000000 end item - Layers = < + MultiResBitmap = < item - Name = 'calculator' - SourceRect.Right = 294.000000000000000000 - SourceRect.Bottom = 294.000000000000000000 + Size = 64 end> + IconName = 'add_image' + SVGText = + ''#13#10' '#13#10' '#13#10' '#13#10' '#13#10' ' + + #13#10' '#13#10' '#13#10' '#13 + + #10' '#13#10''#13#10 + Opacity = 1.000000000000000000 end item - Layers = < + MultiResBitmap = < item - Name = 'calendar' - SourceRect.Right = 32.000000000000000000 - SourceRect.Bottom = 32.000000000000000000 + Size = 64 + end> + IconName = 'add_row' + SVGText = + ''#13#10' '#13#10' ' + + ''#13#10' '#13#10' '#13#10' ' + + ' '#13#10' '#13#10'' + + #13#10 + Opacity = 1.000000000000000000 + end + item + MultiResBitmap = < + item + Size = 64 + end> + IconName = 'address_book' + SVGText = + ''#13#10' '#13#10' '#13#10' '#13#10''#13#10 + Opacity = 1.000000000000000000 + end + item + MultiResBitmap = < + item + Size = 64 + end> + IconName = 'advance' + SVGText = + ''#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10''#13#10 + Opacity = 1.000000000000000000 + end + item + MultiResBitmap = < + item + Size = 64 + end> + IconName = 'advertising' + SVGText = + ''#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10''#13#10 + Opacity = 1.000000000000000000 + end + item + MultiResBitmap = < + item + Size = 64 + end> + IconName = 'alarm_clock' + SVGText = + ''#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' ' + + ' '#13#10' <' + + 'g fill="#37474F">'#13#10' '#13#10' '#13 + + #10' '#13#10''#13#10 + Opacity = 1.000000000000000000 + end + item + MultiResBitmap = < + item + Size = 64 + end> + IconName = 'alphabetical_sorting_az' + SVGText = + ''#13#10' '#13#10' ' + + ''#13#10' '#13#10' '#13#10' '#13#10''#13#10 + Opacity = 1.000000000000000000 + end + item + MultiResBitmap = < + item + Size = 64 + end> + IconName = 'alphabetical_sorting_za' + SVGText = + ''#13#10' '#13#10' '#13#10' <' + + 'path d="M12.4,17.7H20v2.5H8.4v-1.9L16,7.5H8.4V5h11.4v1.7L12.4,17' + + '.7z"/>'#13#10' '#13#10' '#13#10''#13#10 + Opacity = 1.000000000000000000 + end + item + MultiResBitmap = < + item + Size = 64 end> + IconName = 'automatic' + SVGText = + ''#13#10' '#13#10' '#13#10''#13#10 + Opacity = 1.000000000000000000 + end + item + MultiResBitmap = < + item + Size = 64 + end> + IconName = 'automotive' + SVGText = + ''#13#10' '#13#10' <' + + 'g fill="#37474F">'#13#10' '#13#10' ' + + ' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10 + + ''#13#10 + Opacity = 1.000000000000000000 + end + item + MultiResBitmap = < + item + Size = 64 + end> + IconName = 'bearish' + SVGText = + ''#13#10' '#13#10' '#13#10' ' + + ' '#13#10' '#13#10' '#13#10' '#13#10' ' + + #13#10' '#13#10' '#13#10 + + ' '#13#10' '#13#10' '#13#10' '#13#10''#13#10 + Opacity = 1.000000000000000000 + end + item + MultiResBitmap = < + item + Size = 64 + end> + IconName = 'binoculars' + SVGText = + ''#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' ' + + ' '#13#10''#13#10 + Opacity = 1.000000000000000000 + end + item + MultiResBitmap = < + item + Size = 64 + end> + IconName = 'briefcase' + SVGText = + ''#13#10' '#13#10' '#13#10' '#13#10' '#13#10''#13#10 + Opacity = 1.000000000000000000 + end + item + MultiResBitmap = < + item + Size = 64 + end> + IconName = 'bullish' + SVGText = + ''#13#10' '#13#10' '#13#10' ' + + ' '#13#10' '#13#10' '#13#10' '#13#10' ' + + #13#10' '#13#10' '#13#10 + + ' '#13#10' '#13#10' '#13#10' '#13#10''#13#10 + Opacity = 1.000000000000000000 + end + item + MultiResBitmap = < + item + Size = 64 + end> + IconName = 'camcorder' + SVGText = + ''#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' ' + + ' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10''#13#10 + Opacity = 1.000000000000000000 + end + item + MultiResBitmap = < + item + Size = 64 + end> + IconName = 'camcorder_pro' + SVGText = + ''#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' ' + + ' '#13#10''#13#10 + Opacity = 1.000000000000000000 + end + item + MultiResBitmap = < + item + Size = 64 + end> + IconName = 'camera' + SVGText = + ''#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13 + + #10' ' + + #13#10''#13#10 + Opacity = 1.000000000000000000 + end + item + MultiResBitmap = < + item + Size = 64 + end> + IconName = 'cancel' + SVGText = + ''#13#10' '#13#10''#13#10 + Opacity = 1.000000000000000000 + end + item + MultiResBitmap = < + item + Size = 64 + end> + IconName = 'cell_phone' + SVGText = + ''#13#10' '#13#10' '#13#10' '#13#10' ' + + #13#10' '#13#10' <' + + 'path fill="#B3E5FC" d="M19,35h-2c-0.6,0-1-0.4-1-1v-1c0-0.6,0.4-1' + + ',1-1h2c0.6,0,1,0.4,1,1v1C20,34.6,19.6,35,19,35z"/>'#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10''#13#10 + Opacity = 1.000000000000000000 + end + item + MultiResBitmap = < + item + Size = 64 + end> + IconName = 'charge_battery' + SVGText = + ''#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10''#13#10 + Opacity = 1.000000000000000000 + end + item + MultiResBitmap = < + item + Size = 64 + end> + IconName = 'checkmark' + SVGText = + ''#13#10' '#13#10''#13#10 + Opacity = 1.000000000000000000 + end + item + MultiResBitmap = < + item + Size = 64 + end> + IconName = 'clapperboard' + SVGText = + ''#13#10' '#13#10' '#13#10 + + ' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' ' + + ''#13#10''#13#10 + Opacity = 1.000000000000000000 + end + item + MultiResBitmap = < + item + Size = 64 + end> + IconName = 'clock' + SVGText = + ''#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10''#13#10 + Opacity = 1.000000000000000000 + end + item + MultiResBitmap = < + item + Size = 64 + end> + IconName = 'close_up_mode' + SVGText = + ''#13#10' '#13#10' ' + + ' '#13#10' ' + + ' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10''#13#10 + Opacity = 1.000000000000000000 + end + item + MultiResBitmap = < + item + Size = 64 + end> + IconName = 'cloth' + SVGText = + ''#13#10' '#13#10' '#13#10' ' + + ''#13#10' '#13#10' '#13#10' '#13#10' '#13#10' ' + + ''#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' ' + + ''#13#10' '#13#10' '#13#10' '#13#10' '#13#10' ' + + ' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' ' + + ' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10 + + ' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' ' + + ' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' <' + + 'rect x="15" y="17" width="2" height="6"/>'#13#10' '#13#10' '#13#10' '#13#10' '#13#10' ' + + ''#13#10' '#13#10' '#13#10' '#13#10' '#13#10' ' + + ' '#13#10' '#13#10' '#13#10''#13#10 + Opacity = 1.000000000000000000 + end + item + MultiResBitmap = < + item + Size = 64 + end> + IconName = 'collaboration' + SVGText = + ''#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' <' + + 'g fill="#607D8B">'#13#10' '#13#10' '#13#10' '#13#10''#13#10 + Opacity = 1.000000000000000000 + end + item + MultiResBitmap = < + item + Size = 64 + end> + IconName = 'collapse' + SVGText = + ''#13#10' '#13#10 + + ''#13#10 + Opacity = 1.000000000000000000 + end + item + MultiResBitmap = < + item + Size = 64 + end> + IconName = 'collect' + SVGText = + ''#13#10' '#13#10' '#13#10' ' + + ' '#13#10' '#13#10' '#13#10' '#13#10 + + ' '#13#10' '#13#10' <' + + 'g fill="#009688">'#13#10' '#13#10' '#13#10' ' + + #13#10' '#13#10' '#13#10' '#13#10 + + ' '#13#10' '#13#10''#13#10 + Opacity = 1.000000000000000000 + end + item + MultiResBitmap = < + item + Size = 64 + end> + IconName = 'combo_chart' + SVGText = + ''#13#10' '#13#10' '#13#10' ' + + ' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' ' + + ' '#13#10' '#13#10' '#13#10' ' + + ' '#13#10' '#13#10 + + ''#13#10 + Opacity = 1.000000000000000000 + end + item + MultiResBitmap = < + item + Size = 64 + end> + IconName = 'command_line' + SVGText = + ''#13#10''#13#10''#13#10''#13#10#9''#13#10''#13#10''#13#10''#13#10#9''#13#10#9''#13#10#9''#13#10#9''#13#10''#13#10''#13#10#9''#13#10#9''#13#10''#13#10''#13#10 + Opacity = 1.000000000000000000 + end + item + MultiResBitmap = < + item + Size = 64 + end> + IconName = 'comments' + SVGText = + ''#13#10' '#13#10''#13#10 + Opacity = 1.000000000000000000 + end + item + MultiResBitmap = < + item + Size = 64 + end> + IconName = 'compact_camera' + SVGText = + ''#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10''#13#10 + Opacity = 1.000000000000000000 + end + item + MultiResBitmap = < + item + Size = 64 + end> + IconName = 'conference_call' + SVGText = + ''#13#10' '#13#10' '#13#10' ' + + ''#13 + + #10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10''#13#10 + Opacity = 1.000000000000000000 + end + item + MultiResBitmap = < + item + Size = 64 + end> + IconName = 'contacts' + SVGText = + ''#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10''#13#10 + Opacity = 1.000000000000000000 + end + item + MultiResBitmap = < + item + Size = 64 + end> + IconName = 'copyleft' + SVGText = + ''#13#10' '#13#10' '#13#10''#13#10 + Opacity = 1.000000000000000000 + end + item + MultiResBitmap = < + item + Size = 64 + end> + IconName = 'customer_support' + SVGText = + ''#13#10' '#13#10' '#13#10' '#13#10 + + ' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10'' + + #13#10 + Opacity = 1.000000000000000000 + end + item + MultiResBitmap = < + item + Size = 64 + end> + IconName = 'data_sheet' + SVGText = + ''#13#10' '#13#10' '#13#10' '#13#10''#13#10 + Opacity = 1.000000000000000000 + end + item + MultiResBitmap = < + item + Size = 64 + end> + IconName = 'department' + SVGText = + ''#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' <' + + 'rect x="21" y="27" width="6" height="5"/>'#13#10' '#13#10' '#13#10' '#13#10' '#13#10' ' + + ' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' ' + + ' '#13#10''#13#10 + Opacity = 1.000000000000000000 + end + item + MultiResBitmap = < + item + Size = 64 + end> + IconName = 'diploma_2' + SVGText = + ''#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10''#13#10 + Opacity = 1.000000000000000000 + end + item + MultiResBitmap = < + item + Size = 64 + end> + IconName = 'disclaimer' + SVGText = + ''#13#10' '#13#10' '#13#10' '#13#10' '#13#10' ' + + ' '#13#10' '#13#10' <' + + 'path d="M29,21c0,0.6-0.4,1-1,1s-1-0.4-1-1h-5c0,0.6-0.4,1-1,1s-1-' + + '0.4-1-1h-5c0,0.6-0.4,1-1,1s-1-0.4-1-1H8v16 c0,4.4,3.6,8,8,8h11.2' + + 'c3.7,0,6.8-3,6.8-6.8V21H29z"/>'#13#10' '#13#10' ' + + #13#10' '#13#10' '#13#10' '#13#10''#13#10 + Opacity = 1.000000000000000000 + end + item + MultiResBitmap = < + item + Size = 64 + end> + IconName = 'document' + SVGText = + ''#13#10' '#13#10' '#13#10' '#13#10' '#13#10' ' + + ''#13#10' '#13#10' '#13#10' '#13#10''#13#10 + Opacity = 1.000000000000000000 + end + item + MultiResBitmap = < + item + Size = 64 + end> + IconName = 'donate' + SVGText = + ''#13#10' '#13#10' '#13#10' ' + + ''#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13 + + #10''#13#10 + Opacity = 1.000000000000000000 + end + item + MultiResBitmap = < + item + Size = 64 + end> + IconName = 'doughnut_chart' + SVGText = + ''#13#10' '#13#10' '#13#10' '#13#10'<' + + '/svg>'#13#10 + Opacity = 1.000000000000000000 + end + item + MultiResBitmap = < + item + Size = 64 + end> + IconName = 'edit_image' + SVGText = + ''#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10''#13#10 + Opacity = 1.000000000000000000 + end + item + MultiResBitmap = < + item + Size = 64 + end> + IconName = 'electronics' + SVGText = + ''#13#10' '#13#10' '#13#10' ' + + ' '#13#10''#13#10 + Opacity = 1.000000000000000000 + end + item + MultiResBitmap = < + item + Size = 64 + end> + IconName = 'empty_trash' + SVGText = + ''#13#10' '#13#10' '#13#10''#13#10 + Opacity = 1.000000000000000000 + end + item + MultiResBitmap = < + item + Size = 64 + end> + IconName = 'factory' + SVGText = + ''#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10''#13#10 + Opacity = 1.000000000000000000 + end + item + MultiResBitmap = < + item + Size = 64 + end> + IconName = 'faq' + SVGText = + ''#13#10' '#13#10' '#13#10' '#13#10' '#13#10''#13#10 + Opacity = 1.000000000000000000 + end + item + MultiResBitmap = < + item + Size = 64 + end> + IconName = 'feedback' + SVGText = + ''#13#10' '#13#10' '#13 + + #10' '#13 + + #10' '#13#10' '#13#10''#13#10 + Opacity = 1.000000000000000000 + end + item + MultiResBitmap = < + item + Size = 64 + end> + IconName = 'filing_cabinet' + SVGText = + ''#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10''#13#10 + Opacity = 1.000000000000000000 + end + item + MultiResBitmap = < + item + Size = 64 + end> + IconName = 'film' + SVGText = + ''#13#10' '#13#10''#13#10 + Opacity = 1.000000000000000000 + end + item + MultiResBitmap = < + item + Size = 64 + end> + IconName = 'film_reel' + SVGText = + ''#13#10' ' + + #13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' ' + + ' '#13#10' '#13#10''#13#10 + Opacity = 1.000000000000000000 + end + item + MultiResBitmap = < + item + Size = 64 + end> + IconName = 'fine_print' + SVGText = + ''#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' ' + + ' '#13#10' '#13#10''#13#10 + Opacity = 1.000000000000000000 + end + item + MultiResBitmap = < + item + Size = 64 + end> + IconName = 'flash_auto' + SVGText = + ''#13#10' '#13#10 + + ' '#13#10''#13#10 + Opacity = 1.000000000000000000 + end + item + MultiResBitmap = < + item + Size = 64 + end> + IconName = 'flash_off' + SVGText = + ''#13#10' '#13#10 + + ' '#13#10''#13#10 + Opacity = 1.000000000000000000 + end + item + MultiResBitmap = < + item + Size = 64 + end> + IconName = 'flash_on' + SVGText = + ''#13#10' '#13#10 + + ''#13#10 + Opacity = 1.000000000000000000 + end + item + MultiResBitmap = < + item + Size = 64 + end> + IconName = 'flow_chart' + SVGText = + ''#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10''#13#10 + Opacity = 1.000000000000000000 + end + item + MultiResBitmap = < + item + Size = 64 + end> + IconName = 'folder' + SVGText = + ''#13#10' '#13#10' '#13#10''#13#10 + Opacity = 1.000000000000000000 + end + item + MultiResBitmap = < + item + Size = 64 + end> + IconName = 'frame' + SVGText = + ''#13#10' '#13#10' '#13#10''#13#10 + Opacity = 1.000000000000000000 + end + item + MultiResBitmap = < + item + Size = 64 + end> + IconName = 'full_battery' + SVGText = + ''#13#10' '#13#10' '#13#10' '#13#10' '#13#10''#13#10 + Opacity = 1.000000000000000000 + end + item + MultiResBitmap = < + item + Size = 64 + end> + IconName = 'full_trash' + SVGText = + ''#13#10' '#13#10' '#13#10' '#13#10' '#13#10''#13#10 + Opacity = 1.000000000000000000 + end + item + MultiResBitmap = < + item + Size = 64 + end> + IconName = 'gallery' + SVGText = + ''#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10''#13#10 + Opacity = 1.000000000000000000 + end + item + MultiResBitmap = < + item + Size = 64 + end> + IconName = 'globe' + SVGText = + ''#13#10' ' + + #13#10' '#13#10''#13#10 + Opacity = 1.000000000000000000 + end + item + MultiResBitmap = < + item + Size = 64 + end> + IconName = 'graduation_cap' + SVGText = + ''#13#10' '#13#10' '#13#10' ' + + ' '#13#10' '#13#10' '#13#10' '#13#10' ' + + ' '#13#10' '#13#10' '#13#10' '#13#10''#13#10 + Opacity = 1.000000000000000000 + end + item + MultiResBitmap = < + item + Size = 64 + end> + IconName = 'high_priority' + SVGText = + ''#13#10' '#13#10' '#13#10''#13#10 + Opacity = 1.000000000000000000 + end + item + MultiResBitmap = < + item + Size = 64 + end> + IconName = 'home' + SVGText = + ''#13#10' '#13#10' '#13#10' '#13#10' ' + + ' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10''#13#10 + Opacity = 1.000000000000000000 + end + item + MultiResBitmap = < + item + Size = 64 + end> + IconName = 'icons8_cup' + SVGText = + ''#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10'<' + + '/svg>'#13#10 + Opacity = 1.000000000000000000 + end + item + MultiResBitmap = < + item + Size = 64 + end> + IconName = 'idea' + SVGText = + ''#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10''#13#10 + Opacity = 1.000000000000000000 + end + item + MultiResBitmap = < + item + Size = 64 + end> + IconName = 'in_transit' + SVGText = + ''#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' <' + + 'rect y="19" width="10" height="2"/>'#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13 + + #10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10''#13#10 + Opacity = 1.000000000000000000 + end + item + MultiResBitmap = < + item + Size = 64 + end> + IconName = 'inspection' + SVGText = + ''#13#10' '#13#10 + + ' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10''#13#10 + Opacity = 1.000000000000000000 + end + item + MultiResBitmap = < + item + Size = 64 + end> + IconName = 'ipad' + SVGText = + ''#13#10' '#13#10' '#13#10' '#13#10''#13#10 + Opacity = 1.000000000000000000 + end + item + MultiResBitmap = < + item + Size = 64 + end> + IconName = 'iphone' + SVGText = + ''#13#10' '#13#10' '#13#10' '#13#10''#13#10 + Opacity = 1.000000000000000000 + end + item + MultiResBitmap = < + item + Size = 64 + end> + IconName = 'key' + SVGText = + ''#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10''#13#10 + Opacity = 1.000000000000000000 + end + item + MultiResBitmap = < + item + Size = 64 + end> + IconName = 'kindle' + SVGText = + ''#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' ' + + ' '#13#10' '#13#10''#13#10 + Opacity = 1.000000000000000000 + end + item + MultiResBitmap = < + item + Size = 64 + end> + IconName = 'landscape' + SVGText = + ''#13#10' '#13#10' '#13#10' <' + + 'rect x="36" y="8" width="10" height="10"/>'#13#10' '#13#10' '#13#10' '#13#10' '#13#10''#13#10 + Opacity = 1.000000000000000000 + end + item + MultiResBitmap = < + item + Size = 64 + end> + IconName = 'like' + SVGText = + ''#13#10' '#13#10''#13#10 + Opacity = 1.000000000000000000 + end + item + MultiResBitmap = < + item + Size = 64 + end> + IconName = 'list' + SVGText = + ''#13#10' '#13#10' '#13#10' <' + + 'rect x="6" y="14" width="4" height="4"/>'#13#10' '#13#10' '#13#10' ' + + #13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' <' + + 'rect x="14" y="38" width="28" height="4"/>'#13#10' '#13#10''#13#10 + Opacity = 1.000000000000000000 + end + item + MultiResBitmap = < + item + Size = 64 + end> + IconName = 'lock' + SVGText = + ''#13#10' '#13#10' '#13#10' '#13#10''#13#10 + Opacity = 1.000000000000000000 + end + item + MultiResBitmap = < + item + Size = 64 + end> + IconName = 'lock_landscape' + SVGText = + ''#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10''#13#10 + Opacity = 1.000000000000000000 + end + item + MultiResBitmap = < + item + Size = 64 + end> + IconName = 'lock_portrait' + SVGText = + ''#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10''#13#10 + Opacity = 1.000000000000000000 + end + item + MultiResBitmap = < + item + Size = 64 + end> + IconName = 'manager' + SVGText = + ''#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' ' + + ' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10''#13#10 + Opacity = 1.000000000000000000 + end + item + MultiResBitmap = < + item + Size = 64 + end> + IconName = 'mms' + SVGText = + ''#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10''#13#10 + Opacity = 1.000000000000000000 + end + item + MultiResBitmap = < + item + Size = 64 + end> + IconName = 'multiple_devices' + SVGText = + ''#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10''#13#10 + Opacity = 1.000000000000000000 + end + item + MultiResBitmap = < + item + Size = 64 + end> + IconName = 'multiple_smartphones' + SVGText = + ''#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13 + + #10' '#13#10' '#13#10' '#13#10' '#13#10''#13#10 + Opacity = 1.000000000000000000 + end + item + MultiResBitmap = < + item + Size = 64 + end> + IconName = 'old_time_camera' + SVGText = + ''#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' ' + + ''#13#10' '#13#10' '#13#10''#13#10 + Opacity = 1.000000000000000000 + end + item + MultiResBitmap = < + item + Size = 64 + end> + IconName = 'online_support' + SVGText = + ''#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' ' + + ' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10''#13#10 + Opacity = 1.000000000000000000 + end + item + MultiResBitmap = < + item + Size = 64 + end> + IconName = 'opened_folder' + SVGText = + ''#13#10' '#13#10' '#13#10''#13#10 + Opacity = 1.000000000000000000 + end + item + MultiResBitmap = < + item + Size = 64 + end> + IconName = 'org_unit' + SVGText = + ''#13#10' '#13#10' '#13#10' '#13#10' '#13#10 + + ' '#13#10' '#13#10' '#13#10''#13#10 + Opacity = 1.000000000000000000 + end + item + MultiResBitmap = < + item + Size = 64 + end> + IconName = 'organization' + SVGText = + ''#13#10' '#13#10' ' + + ' '#13#10' ' + + ' '#13#10' '#13#10' '#13#10' ' + + ' '#13#10' '#13#10' '#13#10' '#13#10' ' + + #13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10''#13#10 + Opacity = 1.000000000000000000 + end + item + MultiResBitmap = < + item + Size = 64 + end> + IconName = 'overtime' + SVGText = + ''#13#10' '#13#10' '#13#10' '#13#10' <' + + 'circle cx="37" cy="16" r="3"/>'#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' <' + + 'rect x="32" y="34" fill="#90A4AE" width="4" height="4"/>'#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' <' + + 'circle cx="16" cy="15" r="1.5"/>'#13#10''#13#10 + Opacity = 1.000000000000000000 + end + item + MultiResBitmap = < + item + Size = 64 + end> + IconName = 'phone' + SVGText = + ''#13#10' '#13#10''#13#10 + Opacity = 1.000000000000000000 + end + item + MultiResBitmap = < + item + Size = 64 + end> + IconName = 'picture' + SVGText = + ''#13#10' '#13#10' '#13#10' '#13#10' '#13#10''#13#10 + Opacity = 1.000000000000000000 + end + item + MultiResBitmap = < + item + Size = 64 + end> + IconName = 'survey' + SVGText = + ''#13#10' '#13#10 + + ' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10''#13#10 + Opacity = 1.000000000000000000 + end + item + MultiResBitmap = < + item + Size = 64 + end> + IconName = 'switch_camera' + SVGText = + ''#13#10' '#13#10' '#13#10' '#13#10' ' + + ' '#13#10' '#13#10' '#13#10' '#13#10''#13#10 + Opacity = 1.000000000000000000 + end + item + MultiResBitmap = < + item + Size = 64 + end> + IconName = 'two_smartphones' + SVGText = + ''#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10 + + ''#13#10 + Opacity = 1.000000000000000000 + end + item + MultiResBitmap = < + item + Size = 64 + end> + IconName = 'video_projector' + SVGText = + ''#13#10' '#13#10' '#13#10' <' + + 'rect x="37" y="34" width="6" height="3"/>'#13#10' '#13#10' '#13#10' '#13#10' '#13#10' ' + + ' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' ' + + ' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' ' + + ' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10' ' + + ''#13#10''#13#10 + Opacity = 1.000000000000000000 + end + item + MultiResBitmap = < + item + Size = 64 + end> + IconName = 'view_details' + SVGText = + ''#13#10' '#13#10' '#13#10' '#13#10' <' + + 'rect x="13" y="18" width="4" height="4"/>'#13#10' '#13#10' '#13#10' '#13#10' '#13#10' ' + + ' '#13#10' '#13#10' '#13#10''#13#10 + Opacity = 1.000000000000000000 + end + item + MultiResBitmap = < + item + Size = 64 + end> + IconName = 'vlc' + SVGText = + ''#13#10''#13#10''#13#10''#13#10''#13#10''#13#10''#13#10#9''#13#10#9''#13#10#9''#13#10''#13#10 + + ''#13#10 + Opacity = 1.000000000000000000 + end + item + MultiResBitmap = < + item + Size = 64 + end> + IconName = 'voice_presentation' + SVGText = + ''#13#10' '#13#10' '#13#10' '#13#10''#13#10 + Opacity = 1.000000000000000000 + end + item + MultiResBitmap = < + item + Size = 64 + end> + IconName = 'webcam' + SVGText = + ''#13#10' '#13#10' '#13#10' '#13#10' '#13#10' '#13#10''#13#10 + Opacity = 1.000000000000000000 + end + item + MultiResBitmap = < + item + Size = 64 + end> + IconName = 'wi-fi_logo' + SVGText = + ''#13#10''#13#10''#13#10''#13#10''#13#10#9''#13#10#9''#13#10''#13#10''#13#10#9''#13#10#9''#13#10#9''#13#10#9''#13#10''#13#10''#13#10 + Opacity = 1.000000000000000000 + end> + Destination = < + item + Layers = < + item + Name = 'business' + end> + end + item + Layers = < + item + Name = 'business_contact' + end> + end + item + Layers = < + item + Name = 'businessman' + SourceRect.Right = 113.000000000000000000 + SourceRect.Bottom = 113.000000000000000000 + end> + end + item + Layers = < + item + Name = 'businesswoman' + SourceRect.Right = 96.000000000000000000 + SourceRect.Bottom = 96.000000000000000000 + end> + end + item + Layers = < + item + Name = 'calculator' + SourceRect.Right = 294.000000000000000000 + SourceRect.Bottom = 294.000000000000000000 + end> + end + item + Layers = < + item + Name = 'calendar' + SourceRect.Right = 64.000000000000000000 + SourceRect.Bottom = 64.000000000000000000 + end> + end + item + Layers = < + item + Name = 'about' + SourceRect.Right = 64.000000000000000000 + SourceRect.Bottom = 64.000000000000000000 + end> + end + item + Layers = < + item + Name = 'accept_database' + SourceRect.Right = 64.000000000000000000 + SourceRect.Bottom = 64.000000000000000000 + end> + end + item + Layers = < + item + Name = 'add_column' + SourceRect.Right = 64.000000000000000000 + SourceRect.Bottom = 64.000000000000000000 + end> + end + item + Layers = < + item + Name = 'add_database' + SourceRect.Right = 64.000000000000000000 + SourceRect.Bottom = 64.000000000000000000 + end> + end + item + Layers = < + item + Name = 'add_image' + SourceRect.Right = 64.000000000000000000 + SourceRect.Bottom = 64.000000000000000000 + end> + end + item + Layers = < + item + Name = 'add_row' + SourceRect.Right = 64.000000000000000000 + SourceRect.Bottom = 64.000000000000000000 + end> + end + item + Layers = < + item + Name = 'address_book' + SourceRect.Right = 64.000000000000000000 + SourceRect.Bottom = 64.000000000000000000 + end> + end + item + Layers = < + item + Name = 'advance' + SourceRect.Right = 64.000000000000000000 + SourceRect.Bottom = 64.000000000000000000 + end> + end + item + Layers = < + item + Name = 'advertising' + SourceRect.Right = 64.000000000000000000 + SourceRect.Bottom = 64.000000000000000000 + end> + end + item + Layers = < + item + Name = 'alarm_clock' + SourceRect.Right = 64.000000000000000000 + SourceRect.Bottom = 64.000000000000000000 + end> + end + item + Layers = < + item + Name = 'alphabetical_sorting_az' + SourceRect.Right = 64.000000000000000000 + SourceRect.Bottom = 64.000000000000000000 + end> + end + item + Layers = < + item + Name = 'alphabetical_sorting_za' + SourceRect.Right = 64.000000000000000000 + SourceRect.Bottom = 64.000000000000000000 + end> + end + item + Layers = < + item + Name = 'automatic' + SourceRect.Right = 64.000000000000000000 + SourceRect.Bottom = 64.000000000000000000 + end> + end + item + Layers = < + item + Name = 'automotive' + SourceRect.Right = 64.000000000000000000 + SourceRect.Bottom = 64.000000000000000000 + end> + end + item + Layers = < + item + Name = 'bearish' + SourceRect.Right = 64.000000000000000000 + SourceRect.Bottom = 64.000000000000000000 + end> + end + item + Layers = < + item + Name = 'binoculars' + SourceRect.Right = 64.000000000000000000 + SourceRect.Bottom = 64.000000000000000000 + end> + end + item + Layers = < + item + Name = 'briefcase' + SourceRect.Right = 64.000000000000000000 + SourceRect.Bottom = 64.000000000000000000 + end> + end + item + Layers = < + item + Name = 'bullish' + SourceRect.Right = 64.000000000000000000 + SourceRect.Bottom = 64.000000000000000000 + end> + end + item + Layers = < + item + Name = 'camcorder' + SourceRect.Right = 64.000000000000000000 + SourceRect.Bottom = 64.000000000000000000 + end> + end + item + Layers = < + item + Name = 'camcorder_pro' + SourceRect.Right = 64.000000000000000000 + SourceRect.Bottom = 64.000000000000000000 + end> + end + item + Layers = < + item + Name = 'camera' + SourceRect.Right = 64.000000000000000000 + SourceRect.Bottom = 64.000000000000000000 + end> + end + item + Layers = < + item + Name = 'cancel' + SourceRect.Right = 64.000000000000000000 + SourceRect.Bottom = 64.000000000000000000 + end> + end + item + Layers = < + item + Name = 'cell_phone' + SourceRect.Right = 64.000000000000000000 + SourceRect.Bottom = 64.000000000000000000 + end> + end + item + Layers = < + item + Name = 'charge_battery' + SourceRect.Right = 64.000000000000000000 + SourceRect.Bottom = 64.000000000000000000 + end> + end + item + Layers = < + item + Name = 'checkmark' + SourceRect.Right = 64.000000000000000000 + SourceRect.Bottom = 64.000000000000000000 + end> + end + item + Layers = < + item + Name = 'clapperboard' + SourceRect.Right = 64.000000000000000000 + SourceRect.Bottom = 64.000000000000000000 + end> + end + item + Layers = < + item + Name = 'clock' + SourceRect.Right = 64.000000000000000000 + SourceRect.Bottom = 64.000000000000000000 + end> + end + item + Layers = < + item + Name = 'close_up_mode' + SourceRect.Right = 64.000000000000000000 + SourceRect.Bottom = 64.000000000000000000 + end> + end + item + Layers = < + item + Name = 'cloth' + SourceRect.Right = 64.000000000000000000 + SourceRect.Bottom = 64.000000000000000000 + end> + end + item + Layers = < + item + Name = 'collaboration' + SourceRect.Right = 64.000000000000000000 + SourceRect.Bottom = 64.000000000000000000 + end> + end + item + Layers = < + item + Name = 'collapse' + SourceRect.Right = 64.000000000000000000 + SourceRect.Bottom = 64.000000000000000000 + end> + end + item + Layers = < + item + Name = 'collect' + SourceRect.Right = 64.000000000000000000 + SourceRect.Bottom = 64.000000000000000000 + end> + end + item + Layers = < + item + Name = 'combo_chart' + SourceRect.Right = 64.000000000000000000 + SourceRect.Bottom = 64.000000000000000000 + end> + end + item + Layers = < + item + Name = 'command_line' + SourceRect.Right = 64.000000000000000000 + SourceRect.Bottom = 64.000000000000000000 + end> + end + item + Layers = < + item + Name = 'comments' + SourceRect.Right = 64.000000000000000000 + SourceRect.Bottom = 64.000000000000000000 + end> + end + item + Layers = < + item + Name = 'compact_camera' + SourceRect.Right = 64.000000000000000000 + SourceRect.Bottom = 64.000000000000000000 + end> + end + item + Layers = < + item + Name = 'conference_call' + SourceRect.Right = 64.000000000000000000 + SourceRect.Bottom = 64.000000000000000000 + end> + end + item + Layers = < + item + Name = 'contacts' + SourceRect.Right = 64.000000000000000000 + SourceRect.Bottom = 64.000000000000000000 + end> + end + item + Layers = < + item + Name = 'copyleft' + SourceRect.Right = 64.000000000000000000 + SourceRect.Bottom = 64.000000000000000000 + end> + end + item + Layers = < + item + Name = 'customer_support' + SourceRect.Right = 64.000000000000000000 + SourceRect.Bottom = 64.000000000000000000 + end> + end + item + Layers = < + item + Name = 'data_sheet' + SourceRect.Right = 64.000000000000000000 + SourceRect.Bottom = 64.000000000000000000 + end> + end + item + Layers = < + item + Name = 'department' + SourceRect.Right = 64.000000000000000000 + SourceRect.Bottom = 64.000000000000000000 + end> + end + item + Layers = < + item + Name = 'diploma_2' + SourceRect.Right = 64.000000000000000000 + SourceRect.Bottom = 64.000000000000000000 + end> + end + item + Layers = < + item + Name = 'disclaimer' + SourceRect.Right = 64.000000000000000000 + SourceRect.Bottom = 64.000000000000000000 + end> + end + item + Layers = < + item + Name = 'document' + SourceRect.Right = 64.000000000000000000 + SourceRect.Bottom = 64.000000000000000000 + end> + end + item + Layers = < + item + Name = 'donate' + SourceRect.Right = 64.000000000000000000 + SourceRect.Bottom = 64.000000000000000000 + end> + end + item + Layers = < + item + Name = 'doughnut_chart' + SourceRect.Right = 64.000000000000000000 + SourceRect.Bottom = 64.000000000000000000 + end> + end + item + Layers = < + item + Name = 'edit_image' + SourceRect.Right = 64.000000000000000000 + SourceRect.Bottom = 64.000000000000000000 + end> + end + item + Layers = < + item + Name = 'electronics' + SourceRect.Right = 64.000000000000000000 + SourceRect.Bottom = 64.000000000000000000 + end> + end + item + Layers = < + item + Name = 'empty_trash' + SourceRect.Right = 64.000000000000000000 + SourceRect.Bottom = 64.000000000000000000 + end> + end + item + Layers = < + item + Name = 'factory' + SourceRect.Right = 64.000000000000000000 + SourceRect.Bottom = 64.000000000000000000 + end> + end + item + Layers = < + item + Name = 'faq' + SourceRect.Right = 64.000000000000000000 + SourceRect.Bottom = 64.000000000000000000 + end> + end + item + Layers = < + item + Name = 'feedback' + SourceRect.Right = 64.000000000000000000 + SourceRect.Bottom = 64.000000000000000000 + end> + end + item + Layers = < + item + Name = 'filing_cabinet' + SourceRect.Right = 64.000000000000000000 + SourceRect.Bottom = 64.000000000000000000 + end> + end + item + Layers = < + item + Name = 'film' + SourceRect.Right = 64.000000000000000000 + SourceRect.Bottom = 64.000000000000000000 + end> + end + item + Layers = < + item + Name = 'film_reel' + SourceRect.Right = 64.000000000000000000 + SourceRect.Bottom = 64.000000000000000000 + end> + end + item + Layers = < + item + Name = 'fine_print' + SourceRect.Right = 64.000000000000000000 + SourceRect.Bottom = 64.000000000000000000 + end> + end + item + Layers = < + item + Name = 'flash_auto' + SourceRect.Right = 64.000000000000000000 + SourceRect.Bottom = 64.000000000000000000 + end> + end + item + Layers = < + item + Name = 'flash_off' + SourceRect.Right = 64.000000000000000000 + SourceRect.Bottom = 64.000000000000000000 + end> + end + item + Layers = < + item + Name = 'flash_on' + SourceRect.Right = 64.000000000000000000 + SourceRect.Bottom = 64.000000000000000000 + end> + end + item + Layers = < + item + Name = 'flow_chart' + SourceRect.Right = 64.000000000000000000 + SourceRect.Bottom = 64.000000000000000000 + end> + end + item + Layers = < + item + Name = 'folder' + SourceRect.Right = 64.000000000000000000 + SourceRect.Bottom = 64.000000000000000000 + end> + end + item + Layers = < + item + Name = 'frame' + SourceRect.Right = 64.000000000000000000 + SourceRect.Bottom = 64.000000000000000000 + end> + end + item + Layers = < + item + Name = 'full_battery' + SourceRect.Right = 64.000000000000000000 + SourceRect.Bottom = 64.000000000000000000 + end> + end + item + Layers = < + item + Name = 'full_trash' + SourceRect.Right = 64.000000000000000000 + SourceRect.Bottom = 64.000000000000000000 + end> + end + item + Layers = < + item + Name = 'gallery' + SourceRect.Right = 64.000000000000000000 + SourceRect.Bottom = 64.000000000000000000 + end> + end + item + Layers = < + item + Name = 'globe' + SourceRect.Right = 64.000000000000000000 + SourceRect.Bottom = 64.000000000000000000 + end> + end + item + Layers = < + item + Name = 'graduation_cap' + SourceRect.Right = 64.000000000000000000 + SourceRect.Bottom = 64.000000000000000000 + end> + end + item + Layers = < + item + Name = 'high_priority' + SourceRect.Right = 64.000000000000000000 + SourceRect.Bottom = 64.000000000000000000 + end> + end + item + Layers = < + item + Name = 'home' + SourceRect.Right = 64.000000000000000000 + SourceRect.Bottom = 64.000000000000000000 + end> + end + item + Layers = < + item + Name = 'icons8_cup' + SourceRect.Right = 64.000000000000000000 + SourceRect.Bottom = 64.000000000000000000 + end> + end + item + Layers = < + item + Name = 'idea' + SourceRect.Right = 64.000000000000000000 + SourceRect.Bottom = 64.000000000000000000 + end> + end + item + Layers = < + item + Name = 'in_transit' + SourceRect.Right = 64.000000000000000000 + SourceRect.Bottom = 64.000000000000000000 + end> + end + item + Layers = < + item + Name = 'inspection' + SourceRect.Right = 64.000000000000000000 + SourceRect.Bottom = 64.000000000000000000 + end> + end + item + Layers = < + item + Name = 'ipad' + SourceRect.Right = 64.000000000000000000 + SourceRect.Bottom = 64.000000000000000000 + end> + end + item + Layers = < + item + Name = 'iphone' + SourceRect.Right = 64.000000000000000000 + SourceRect.Bottom = 64.000000000000000000 + end> + end + item + Layers = < + item + Name = 'key' + SourceRect.Right = 64.000000000000000000 + SourceRect.Bottom = 64.000000000000000000 + end> + end + item + Layers = < + item + Name = 'kindle' + SourceRect.Right = 64.000000000000000000 + SourceRect.Bottom = 64.000000000000000000 + end> + end + item + Layers = < + item + Name = 'landscape' + SourceRect.Right = 64.000000000000000000 + SourceRect.Bottom = 64.000000000000000000 + end> + end + item + Layers = < + item + Name = 'like' + SourceRect.Right = 64.000000000000000000 + SourceRect.Bottom = 64.000000000000000000 + end> + end + item + Layers = < + item + Name = 'list' + SourceRect.Right = 64.000000000000000000 + SourceRect.Bottom = 64.000000000000000000 + end> + end + item + Layers = < + item + Name = 'lock' + SourceRect.Right = 64.000000000000000000 + SourceRect.Bottom = 64.000000000000000000 + end> + end + item + Layers = < + item + Name = 'lock_landscape' + SourceRect.Right = 64.000000000000000000 + SourceRect.Bottom = 64.000000000000000000 + end> + end + item + Layers = < + item + Name = 'lock_portrait' + SourceRect.Right = 64.000000000000000000 + SourceRect.Bottom = 64.000000000000000000 + end> + end + item + Layers = < + item + Name = 'manager' + SourceRect.Right = 64.000000000000000000 + SourceRect.Bottom = 64.000000000000000000 + end> + end + item + Layers = < + item + Name = 'mms' + SourceRect.Right = 64.000000000000000000 + SourceRect.Bottom = 64.000000000000000000 + end> + end + item + Layers = < + item + Name = 'multiple_devices' + SourceRect.Right = 64.000000000000000000 + SourceRect.Bottom = 64.000000000000000000 + end> + end + item + Layers = < + item + Name = 'multiple_smartphones' + SourceRect.Right = 64.000000000000000000 + SourceRect.Bottom = 64.000000000000000000 + end> + end + item + Layers = < + item + Name = 'old_time_camera' + SourceRect.Right = 64.000000000000000000 + SourceRect.Bottom = 64.000000000000000000 + end> + end + item + Layers = < + item + Name = 'online_support' + SourceRect.Right = 64.000000000000000000 + SourceRect.Bottom = 64.000000000000000000 + end> + end + item + Layers = < + item + Name = 'opened_folder' + SourceRect.Right = 64.000000000000000000 + SourceRect.Bottom = 64.000000000000000000 + end> + end + item + Layers = < + item + Name = 'org_unit' + SourceRect.Right = 64.000000000000000000 + SourceRect.Bottom = 64.000000000000000000 + end> + end + item + Layers = < + item + Name = 'organization' + SourceRect.Right = 64.000000000000000000 + SourceRect.Bottom = 64.000000000000000000 + end> + end + item + Layers = < + item + Name = 'overtime' + SourceRect.Right = 64.000000000000000000 + SourceRect.Bottom = 64.000000000000000000 + end> + end + item + Layers = < + item + Name = 'phone' + SourceRect.Right = 64.000000000000000000 + SourceRect.Bottom = 64.000000000000000000 + end> + end + item + Layers = < + item + Name = 'picture' + SourceRect.Right = 64.000000000000000000 + SourceRect.Bottom = 64.000000000000000000 + end> + end + item + Layers = < + item + Name = 'survey' + SourceRect.Right = 64.000000000000000000 + SourceRect.Bottom = 64.000000000000000000 + end> + end + item + Layers = < + item + Name = 'switch_camera' + SourceRect.Right = 64.000000000000000000 + SourceRect.Bottom = 64.000000000000000000 + end> + end + item + Layers = < + item + Name = 'two_smartphones' + SourceRect.Right = 64.000000000000000000 + SourceRect.Bottom = 64.000000000000000000 + end> + end + item + Layers = < + item + Name = 'video_projector' + SourceRect.Right = 64.000000000000000000 + SourceRect.Bottom = 64.000000000000000000 + end> + end + item + Layers = < + item + Name = 'view_details' + SourceRect.Right = 64.000000000000000000 + SourceRect.Bottom = 64.000000000000000000 + end> + end + item + Layers = < + item + Name = 'vlc' + SourceRect.Right = 64.000000000000000000 + SourceRect.Bottom = 64.000000000000000000 + end> + end + item + Layers = < + item + Name = 'voice_presentation' + SourceRect.Right = 64.000000000000000000 + SourceRect.Bottom = 64.000000000000000000 + end> + end + item + Layers = < + item + Name = 'webcam' + SourceRect.Right = 64.000000000000000000 + SourceRect.Bottom = 64.000000000000000000 + end> + end + item + Layers = < + item + Name = 'wi-fi_logo' + SourceRect.Right = 64.000000000000000000 + SourceRect.Bottom = 64.000000000000000000 + end> + end + item + Layers = <> end> + Size = 64 Left = 72 Top = 264 end diff --git a/Demo/Source/UMainFMX.pas b/Demo/Source/UMainFMX.pas index dbf20b9a..eb6a34bc 100644 --- a/Demo/Source/UMainFMX.pas +++ b/Demo/Source/UMainFMX.pas @@ -25,7 +25,6 @@ TSVGIconImageListForm = class(TForm) ImageView: TListBox; ListBoxItem1: TListBoxItem; ListBoxItem2: TListBoxItem; - SpinBox1: TSpinBox; ListBoxItem3: TListBoxItem; TopPanel: TPanel; Glyph2: TGlyph; @@ -34,13 +33,15 @@ TSVGIconImageListForm = class(TForm) SVGIconImageList: TSVGIconImageList; OpenDialog: TOpenDialog; GrayScaleCheckBox: TCheckBox; + ZoomSpinBox: TSpinBox; + ZoomLabel: TLabel; procedure FormCreate(Sender: TObject); procedure NextButtonClick(Sender: TObject); procedure RandomButtonClick(Sender: TObject); procedure AutoSizeCheckBoxChange(Sender: TObject); procedure PrevButtonClick(Sender: TObject); procedure ShowEditorButtonClick(Sender: TObject); - procedure SpinBox1Change(Sender: TObject); + procedure ZoomSpinBoxChange(Sender: TObject); procedure GrayScaleCheckBoxChange(Sender: TObject); private procedure UpdateGUI; @@ -100,9 +101,9 @@ procedure TSVGIconImageListForm.ShowEditorButtonClick(Sender: TObject); {$IFDEF MSWINDOWS}EditSVGIconImageList(SVGIconImageList);{$ENDIF} end; -procedure TSVGIconImageListForm.SpinBox1Change(Sender: TObject); +procedure TSVGIconImageListForm.ZoomSpinBoxChange(Sender: TObject); begin - SVGIconImageList.Size := Round(SpinBox1.Value); + SVGIconImageList.Zoom := Round(ZoomSpinBox.Value); end; procedure TSVGIconImageListForm.UpdateGUI; diff --git a/Packages/FMX.SVGIconImageListEditorUnit.fmx b/Packages/FMX.SVGIconImageListEditorUnit.fmx index a71a1881..ea8713ea 100644 --- a/Packages/FMX.SVGIconImageListEditorUnit.fmx +++ b/Packages/FMX.SVGIconImageListEditorUnit.fmx @@ -4,8 +4,8 @@ object SVGIconImageListEditorFMX: TSVGIconImageListEditorFMX Caption = 'FireMonkey SVG Icons ImageList Editor %s - Copyright Ethea S.r.l' + '.' - ClientHeight = 540 - ClientWidth = 632 + ClientHeight = 633 + ClientWidth = 800 FormFactor.Width = 320 FormFactor.Height = 480 FormFactor.Devices = [Desktop] @@ -14,336 +14,6 @@ object SVGIconImageListEditorFMX: TSVGIconImageListEditorFMX OnResize = FormResize OnShow = FormShow DesignerMasterStyle = 0 - object paTop: TPanel - Align = Top - Size.Width = 632.000000000000000000 - Size.Height = 209.000000000000000000 - Size.PlatformDefault = False - TabOrder = 1 - object Panel4: TPanel - Align = Right - Position.X = 546.000000000000000000 - Size.Width = 86.000000000000000000 - Size.Height = 209.000000000000000000 - Size.PlatformDefault = False - TabOrder = 3 - object OKButton: TButton - Default = True - ModalResult = 1 - Position.X = 6.000000000000000000 - Position.Y = 5.000000000000000000 - Size.Width = 75.000000000000000000 - Size.Height = 22.000000000000000000 - Size.PlatformDefault = False - TabOrder = 0 - Text = 'OK' - end - object CancelButton: TButton - Cancel = True - ModalResult = 2 - Position.X = 6.000000000000000000 - Position.Y = 31.000000000000000000 - Size.Width = 75.000000000000000000 - Size.Height = 22.000000000000000000 - Size.PlatformDefault = False - TabOrder = 1 - Text = 'Cancel' - end - object HelpButton: TButton - Position.X = 6.000000000000000000 - Position.Y = 57.000000000000000000 - Size.Width = 75.000000000000000000 - Size.Height = 22.000000000000000000 - Size.PlatformDefault = False - TabOrder = 2 - Text = 'Help' - OnClick = HelpButtonClick - end - end - object paClient: TPanel - Align = Client - Size.Width = 546.000000000000000000 - Size.Height = 209.000000000000000000 - Size.PlatformDefault = False - TabOrder = 0 - object ImageListGroupBox: TGroupBox - Align = Top - Size.Width = 546.000000000000000000 - Size.Height = 65.000000000000000000 - Size.PlatformDefault = False - Text = 'Properties of ImageList' - TabOrder = 1 - object AutoSizeCheckBox: TCheckBox - Position.X = 377.000000000000000000 - Position.Y = 17.000000000000000000 - TabOrder = 6 - Text = 'AutoSizeBitmaps' - OnChange = AutoSizeCheckBoxClick - end - object DefaultOpacitySpinBox: TSpinBox - Touch.InteractiveGestures = [LongTap, DoubleTap] - TabOrder = 3 - Cursor = crIBeam - DecimalDigits = 1 - Value = 100.000000000000000000 - Position.X = 99.000000000000000000 - Position.Y = 34.000000000000000000 - OnChange = DefaultOpacitySpinBoxChange - end - object DefaultOpacityLabel: TLabel - Position.X = 99.000000000000000000 - Position.Y = 17.000000000000000000 - Size.Width = 107.000000000000000000 - Size.Height = 17.000000000000000000 - Size.PlatformDefault = False - Text = '% Opacity (default)' - TabOrder = 2 - end - object SizeSpinBox: TSpinBox - Touch.InteractiveGestures = [LongTap, DoubleTap] - TabOrder = 1 - Cursor = crIBeam - DecimalDigits = 0 - Max = 256.000000000000000000 - Value = 128.000000000000000000 - Position.X = 8.000000000000000000 - Position.Y = 34.000000000000000000 - Size.Width = 84.000000000000000000 - Size.Height = 22.000000000000000000 - Size.PlatformDefault = False - OnChange = SizeChange - end - object SizeLabel: TLabel - Position.X = 9.000000000000000000 - Position.Y = 17.000000000000000000 - Size.Width = 88.000000000000000000 - Size.Height = 17.000000000000000000 - Size.PlatformDefault = False - Text = 'Size (in pixel)' - TabOrder = 0 - end - object FixedColorComboBox: TComboBox - Position.X = 205.000000000000000000 - Position.Y = 34.000000000000000000 - Size.Width = 154.000000000000000000 - Size.Height = 22.000000000000000000 - Size.PlatformDefault = False - TabOrder = 5 - OnChange = FixedColorComboBoxChange - end - object FixedColorLabel: TLabel - Position.X = 204.000000000000000000 - Position.Y = 17.000000000000000000 - Size.Width = 107.000000000000000000 - Size.Height = 17.000000000000000000 - Size.PlatformDefault = False - Text = 'Fixed Color' - TabOrder = 4 - end - object GrayScaleCheckBox: TCheckBox - Position.X = 377.000000000000000000 - Position.Y = 36.000000000000000000 - TabOrder = 7 - Text = 'GrayScale' - OnChange = GrayScaleCheckBoxChange - end - end - object ItemGroupBox: TGroupBox - Align = Client - Size.Width = 546.000000000000000000 - Size.Height = 144.000000000000000000 - Size.PlatformDefault = False - Text = 'Properties of Selected Icon n.%d' - TabOrder = 2 - object IconName: TEdit - Touch.InteractiveGestures = [LongTap, DoubleTap] - TabOrder = 5 - Position.X = 94.000000000000000000 - Position.Y = 75.000000000000000000 - Size.Width = 155.000000000000000000 - Size.Height = 22.000000000000000000 - Size.PlatformDefault = False - OnExit = IconNameExit - end - object IconNameLabel: TLabel - Position.X = 94.000000000000000000 - Position.Y = 59.000000000000000000 - Size.Width = 74.000000000000000000 - Size.Height = 17.000000000000000000 - Size.PlatformDefault = False - Text = 'IconName' - TabOrder = 4 - end - object OpacityLabel: TLabel - Position.X = 94.000000000000000000 - Position.Y = 16.000000000000000000 - Size.Width = 97.000000000000000000 - Size.Height = 17.000000000000000000 - Size.PlatformDefault = False - Text = '% Opacity' - TabOrder = 1 - end - object OpacitySpinBox: TSpinBox - Touch.InteractiveGestures = [LongTap, DoubleTap] - TabOrder = 2 - Cursor = crIBeam - Value = 100.000000000000000000 - Position.X = 94.000000000000000000 - Position.Y = 34.000000000000000000 - Size.Width = 77.000000000000000000 - Size.Height = 22.000000000000000000 - Size.PlatformDefault = False - OnChange = OpacitySpinBoxChange - end - object IconPanel: TPanel - Margins.Left = 8.000000000000000000 - Margins.Top = 20.000000000000000000 - Margins.Right = 8.000000000000000000 - Margins.Bottom = 8.000000000000000000 - Position.X = 8.000000000000000000 - Position.Y = 38.000000000000000000 - Size.Width = 82.000000000000000000 - Size.Height = 83.000000000000000000 - Size.PlatformDefault = False - TabOrder = 0 - object IconImage: TGlyph - Margins.Left = 4.000000000000000000 - Margins.Top = 4.000000000000000000 - Margins.Right = 4.000000000000000000 - Margins.Bottom = 4.000000000000000000 - Align = Client - Size.Width = 74.000000000000000000 - Size.Height = 75.000000000000000000 - Size.PlatformDefault = False - ImageIndex = 1 - end - end - object SVGText: TMemo - Touch.InteractiveGestures = [Pan, LongTap, DoubleTap] - DataDetectorTypes = [] - Anchors = [akLeft, akTop, akRight, akBottom] - Position.X = 256.000000000000000000 - Position.Y = 16.000000000000000000 - Size.Width = 281.000000000000000000 - Size.Height = 121.000000000000000000 - Size.PlatformDefault = False - TabOrder = 8 - OnExit = SVGTextExit - Viewport.Width = 277.000000000000000000 - Viewport.Height = 117.000000000000000000 - end - object GrayScaleItemCheckBox: TCheckBox - Position.X = 173.000000000000000000 - Position.Y = 39.000000000000000000 - Size.Width = 78.000000000000000000 - Size.Height = 19.000000000000000000 - Size.PlatformDefault = False - TabOrder = 3 - Text = 'GrayScale' - OnChange = GrayScaleItemCheckBoxChange - end - object FixedColorItemLabel: TLabel - Position.X = 93.000000000000000000 - Position.Y = 97.000000000000000000 - Size.Width = 107.000000000000000000 - Size.Height = 17.000000000000000000 - Size.PlatformDefault = False - Text = 'Fixed Color' - TabOrder = 6 - end - object FixedColorItemComboBox: TComboBox - Position.X = 94.000000000000000000 - Position.Y = 114.000000000000000000 - Size.Width = 154.000000000000000000 - Size.Height = 22.000000000000000000 - Size.PlatformDefault = False - TabOrder = 7 - OnChange = FixedColorItemComboBoxChange - end - end - end - end - object PaButtons: TPanel - Align = Bottom - Position.Y = 503.000000000000000000 - Size.Width = 632.000000000000000000 - Size.Height = 37.000000000000000000 - Size.PlatformDefault = False - TabOrder = 2 - object AddButton: TButton - Position.X = 92.000000000000000000 - Position.Y = 8.000000000000000000 - Size.Width = 81.000000000000000000 - Size.Height = 22.000000000000000000 - Size.PlatformDefault = False - TabOrder = 1 - Text = 'Add...' - OnClick = AddButtonClick - end - object DeleteButton: TButton - Position.X = 180.000000000000000000 - Position.Y = 8.000000000000000000 - Size.Width = 81.000000000000000000 - Size.Height = 22.000000000000000000 - Size.PlatformDefault = False - TabOrder = 2 - Text = 'Delete' - OnClick = DeleteButtonClick - end - object ClearAllButton: TButton - Position.X = 268.000000000000000000 - Position.Y = 8.000000000000000000 - Size.Width = 81.000000000000000000 - Size.Height = 22.000000000000000000 - Size.PlatformDefault = False - TabOrder = 3 - Text = 'Clear all' - OnClick = ClearAllButtonClick - end - object NewButton: TButton - Position.X = 4.000000000000000000 - Position.Y = 8.000000000000000000 - Size.Width = 81.000000000000000000 - Size.Height = 22.000000000000000000 - Size.PlatformDefault = False - TabOrder = 0 - Text = 'New' - OnClick = NewButtonClick - end - end - object IconsGroupBox: TGroupBox - Align = Client - Size.Width = 632.000000000000000000 - Size.Height = 288.000000000000000000 - Size.PlatformDefault = False - Text = '%d Icons of Imagelist' - TabOrder = 0 - object ImageView: TListBox - Align = Client - Margins.Left = 4.000000000000000000 - Margins.Top = 16.000000000000000000 - Margins.Right = 4.000000000000000000 - Margins.Bottom = 4.000000000000000000 - Size.Width = 624.000000000000000000 - Size.Height = 268.000000000000000000 - Size.PlatformDefault = False - TabOrder = 0 - OnDragOver = ImageViewDragOver - OnDragDrop = ImageViewDragDrop - AllowDrag = True - Columns = 5 - DisableFocusEffect = True - ItemHeight = 36.000000000000000000 - ItemWidth = 120.000000000000000000 - DefaultItemStyles.ItemStyle = '' - DefaultItemStyles.GroupHeaderStyle = '' - DefaultItemStyles.GroupFooterStyle = '' - OnChange = ImageViewSelectItem - OnDragChange = ImageViewDragChange - Viewport.Width = 620.000000000000000000 - Viewport.Height = 264.000000000000000000 - end - end object ListBoxItemStyleBook: TStyleBook Styles = < item @@ -354,21 +24,21 @@ object SVGIconImageListEditorFMX: TSVGIconImageListEditorFMX 464D585F5354594C4520322E35010616437573746F6D4C697374426F78497465 6D5374796C65037010005450463007544C61796F757400095374796C654E616D 650616437573746F6D4C697374426F784974656D5374796C6505416C69676E07 - 0643656E7465720A53697A652E576964746805000000000000009606400B5369 + 0643656E7465720A53697A652E57696474680500000000000000B406400B5369 7A652E48656967687405000000000000008005401453697A652E506C6174666F 726D44656661756C7408085461624F726465720200000654476C797068000953 74796C654E616D65060A676C7970687374796C650C4D617267696E732E4C6566 7405000000000000008000400B4D617267696E732E546F700500000000000000 80FF3F0D4D617267696E732E526967687405000000000000008000400E4D6172 67696E732E426F74746F6D050000000000000080FF3F05416C69676E07044C65 - 66740A53697A652E576964746805000000000000008004400B53697A652E4865 - 6967687405000000000000008004401453697A652E506C6174666F726D446566 + 66740A53697A652E576964746805000000000000008005400B53697A652E4865 + 6967687405000000000000008005401453697A652E506C6174666F726D446566 61756C7408000016544163746976655374796C65546578744F626A6563740009 5374796C654E616D6506047465787405416C69676E0706436C69656E740C4D61 7267696E732E4C6566740500000000000000C000400B4D617267696E732E546F 70050000000000000080FF3F0D4D617267696E732E5269676874050000000000 0000C000400E4D617267696E732E426F74746F6D050000000000000080FF3F0A - 53697A652E576964746805000000000000009006400B53697A652E4865696768 + 53697A652E57696474680500000000000000AE06400B53697A652E4865696768 740500000000000000F804401453697A652E506C6174666F726D44656661756C 74080454657874060454657874155465787453657474696E67732E576F726457 72617008165465787453657474696E67732E486F727A416C69676E07074C6561 @@ -488,19 +158,437 @@ object SVGIconImageListEditorFMX: TSVGIconImageListEditorFMX Left = 408 Top = 104 end - object TopSplitter: TSplitter - Align = Top - Cursor = crVSplit - MinSize = 20.000000000000000000 - Position.Y = 209.000000000000000000 - Size.Width = 632.000000000000000000 - Size.Height = 6.000000000000000000 - Size.PlatformDefault = False - end object OpenDialog: TOpenDialog Filter = 'Scalable Vector Graphics (*.svg)|*.svg' Options = [ofHideReadOnly, ofAllowMultiSelect, ofPathMustExist, ofFileMustExist, ofEnableSizing] Left = 324 Top = 102 end + object BottomPanel: TPanel + Align = Bottom + Position.Y = 601.000000000000000000 + Size.Width = 800.000000000000000000 + Size.Height = 32.000000000000000000 + Size.PlatformDefault = False + TabOrder = 2 + object OKButton: TButton + Anchors = [akTop, akRight] + Default = True + ModalResult = 1 + Position.X = 558.000000000000000000 + Position.Y = 5.000000000000000000 + Size.Width = 75.000000000000000000 + Size.Height = 22.000000000000000000 + Size.PlatformDefault = False + TabOrder = 0 + Text = 'OK' + end + object CancelButton: TButton + Anchors = [akTop, akRight] + Cancel = True + ModalResult = 2 + Position.X = 638.000000000000000000 + Position.Y = 5.000000000000000000 + Size.Width = 75.000000000000000000 + Size.Height = 22.000000000000000000 + Size.PlatformDefault = False + TabOrder = 1 + Text = 'Cancel' + end + object HelpButton: TButton + Anchors = [akTop, akRight] + Position.X = 718.000000000000000000 + Position.Y = 5.000000000000000000 + Size.Width = 75.000000000000000000 + Size.Height = 22.000000000000000000 + Size.PlatformDefault = False + TabOrder = 2 + Text = 'Help' + OnClick = HelpButtonClick + end + end + object TopPanel: TPanel + Align = Client + Size.Width = 800.000000000000000000 + Size.Height = 435.000000000000000000 + Size.PlatformDefault = False + TabOrder = 1 + object ButtonsPanel: TPanel + Align = Right + Position.X = 688.000000000000000000 + Size.Width = 112.000000000000000000 + Size.Height = 435.000000000000000000 + Size.PlatformDefault = False + TabOrder = 2 + object AddButton: TButton + Position.X = 3.000000000000000000 + Position.Y = 30.000000000000000000 + Size.Width = 106.000000000000000000 + Size.Height = 22.000000000000000000 + Size.PlatformDefault = False + TabOrder = 1 + Text = 'Add...' + OnClick = AddButtonClick + end + object DeleteButton: TButton + Position.X = 3.000000000000000000 + Position.Y = 56.000000000000000000 + Size.Width = 106.000000000000000000 + Size.Height = 22.000000000000000000 + Size.PlatformDefault = False + TabOrder = 2 + Text = 'Delete' + OnClick = DeleteButtonClick + end + object ClearAllButton: TButton + Position.X = 3.000000000000000000 + Position.Y = 82.000000000000000000 + Size.Width = 106.000000000000000000 + Size.Height = 22.000000000000000000 + Size.PlatformDefault = False + TabOrder = 3 + Text = 'Clear all' + OnClick = ClearAllButtonClick + end + object NewButton: TButton + Position.X = 3.000000000000000000 + Position.Y = 4.000000000000000000 + Size.Width = 106.000000000000000000 + Size.Height = 22.000000000000000000 + Size.PlatformDefault = False + TabOrder = 0 + Text = 'New' + OnClick = NewButtonClick + end + end + object paClient: TPanel + Align = Client + Size.Width = 688.000000000000000000 + Size.Height = 435.000000000000000000 + Size.PlatformDefault = False + TabOrder = 0 + object ImageListGroupBox: TGroupBox + Align = Left + Size.Width = 217.000000000000000000 + Size.Height = 435.000000000000000000 + Size.PlatformDefault = False + Text = 'Properties of ImageList' + TabOrder = 1 + object AutoSizeCheckBox: TCheckBox + Position.X = 94.000000000000000000 + Position.Y = 25.000000000000000000 + TabOrder = 12 + Text = 'AutoSizeBitmaps' + OnChange = AutoSizeCheckBoxClick + end + object DefaultOpacitySpinBox: TSpinBox + Touch.InteractiveGestures = [LongTap, DoubleTap] + TabOrder = 9 + Cursor = crIBeam + DecimalDigits = 1 + Value = 100.000000000000000000 + Position.X = 94.000000000000000000 + Position.Y = 120.000000000000000000 + Size.Width = 80.000000000000000000 + Size.Height = 22.000000000000000000 + Size.PlatformDefault = False + OnChange = DefaultOpacitySpinBoxChange + end + object DefaultOpacityLabel: TLabel + Position.X = 94.000000000000000000 + Position.Y = 103.000000000000000000 + Size.Width = 107.000000000000000000 + Size.Height = 17.000000000000000000 + Size.PlatformDefault = False + Text = '% Opacity (default)' + TabOrder = 2 + end + object SizeSpinBox: TSpinBox + Touch.InteractiveGestures = [LongTap, DoubleTap] + TabOrder = 1 + Cursor = crIBeam + DecimalDigits = 0 + Max = 256.000000000000000000 + Value = 128.000000000000000000 + Position.X = 6.000000000000000000 + Position.Y = 34.000000000000000000 + Size.Width = 80.000000000000000000 + Size.Height = 22.000000000000000000 + Size.PlatformDefault = False + OnChange = SizeChange + end + object SizeLabel: TLabel + Position.X = 6.000000000000000000 + Position.Y = 17.000000000000000000 + Size.Width = 88.000000000000000000 + Size.Height = 17.000000000000000000 + Size.PlatformDefault = False + Text = 'Size (in pixel)' + TabOrder = 0 + end + object FixedColorComboBox: TComboBox + Position.X = 6.000000000000000000 + Position.Y = 161.000000000000000000 + Size.Width = 167.000000000000000000 + Size.Height = 22.000000000000000000 + Size.PlatformDefault = False + TabOrder = 11 + OnChange = FixedColorComboBoxChange + end + object FixedColorLabel: TLabel + Position.X = 6.000000000000000000 + Position.Y = 144.000000000000000000 + Size.Width = 107.000000000000000000 + Size.Height = 17.000000000000000000 + Size.PlatformDefault = False + Text = 'Fixed Color' + TabOrder = 10 + end + object GrayScaleCheckBox: TCheckBox + Position.X = 94.000000000000000000 + Position.Y = 44.000000000000000000 + TabOrder = 13 + Text = 'GrayScale' + OnChange = GrayScaleCheckBoxChange + end + object WidthLabel: TLabel + Position.X = 6.000000000000000000 + Position.Y = 62.000000000000000000 + Size.Width = 88.000000000000000000 + Size.Height = 17.000000000000000000 + Size.PlatformDefault = False + Text = 'Width (in pixel)' + TabOrder = 3 + TabStop = False + end + object WidthSpinBox: TSpinBox + Touch.InteractiveGestures = [LongTap, DoubleTap] + TabOrder = 4 + Cursor = crIBeam + DecimalDigits = 0 + Max = 256.000000000000000000 + Position.X = 6.000000000000000000 + Position.Y = 80.000000000000000000 + Size.Width = 80.000000000000000000 + Size.Height = 22.000000000000000000 + Size.PlatformDefault = False + OnChange = SizeChange + end + object HeightLabel: TLabel + Position.X = 94.000000000000000000 + Position.Y = 62.000000000000000000 + Size.Width = 88.000000000000000000 + Size.Height = 17.000000000000000000 + Size.PlatformDefault = False + Text = 'Height (in pixel)' + TabOrder = 5 + TabStop = False + end + object HeightSpinBox: TSpinBox + Touch.InteractiveGestures = [LongTap, DoubleTap] + TabOrder = 6 + Cursor = crIBeam + DecimalDigits = 0 + Max = 256.000000000000000000 + Value = 128.000000000000000000 + Position.X = 94.000000000000000000 + Position.Y = 80.000000000000000000 + Size.Width = 80.000000000000000000 + Size.Height = 22.000000000000000000 + Size.PlatformDefault = False + OnChange = SizeChange + end + object ZoomLabel: TLabel + Position.X = 6.000000000000000000 + Position.Y = 102.000000000000000000 + Size.Width = 83.000000000000000000 + Size.Height = 17.000000000000000000 + Size.PlatformDefault = False + Text = 'Zoom %' + TabOrder = 7 + TabStop = False + end + object ZoomSpinBox: TSpinBox + Touch.InteractiveGestures = [LongTap, DoubleTap] + TabOrder = 8 + Cursor = crIBeam + DecimalDigits = 0 + Min = 10.000000000000000000 + Value = 100.000000000000000000 + Position.X = 6.000000000000000000 + Position.Y = 120.000000000000000000 + Size.Width = 80.000000000000000000 + Size.Height = 22.000000000000000000 + Size.PlatformDefault = False + OnChange = ZoomChange + end + end + object IconsGroupBox: TGroupBox + Align = Client + Size.Width = 471.000000000000000000 + Size.Height = 435.000000000000000000 + Size.PlatformDefault = False + Text = '%d Icons of Imagelist' + TabOrder = 2 + object ImageView: TListBox + Align = Client + Margins.Left = 4.000000000000000000 + Margins.Top = 16.000000000000000000 + Margins.Right = 4.000000000000000000 + Margins.Bottom = 4.000000000000000000 + Size.Width = 463.000000000000000000 + Size.Height = 415.000000000000000000 + Size.PlatformDefault = False + TabOrder = 0 + OnDragOver = ImageViewDragOver + OnDragDrop = ImageViewDragDrop + AllowDrag = True + Columns = 2 + DisableFocusEffect = True + ItemHeight = 36.000000000000000000 + ItemWidth = 200.000000000000000000 + DefaultItemStyles.ItemStyle = '' + DefaultItemStyles.GroupHeaderStyle = '' + DefaultItemStyles.GroupFooterStyle = '' + OnChange = ImageViewSelectItem + OnDragChange = ImageViewDragChange + Viewport.Width = 459.000000000000000000 + Viewport.Height = 411.000000000000000000 + end + end + end + end + object ItemPanel: TPanel + Align = Bottom + Position.Y = 441.000000000000000000 + Size.Width = 800.000000000000000000 + Size.Height = 160.000000000000000000 + Size.PlatformDefault = False + TabOrder = 0 + object ItemGroupBox: TGroupBox + Align = Client + Size.Width = 656.000000000000000000 + Size.Height = 160.000000000000000000 + Size.PlatformDefault = False + Text = 'Properties of Selected Icon n.%d' + TabOrder = 1 + object IconName: TEdit + Touch.InteractiveGestures = [LongTap, DoubleTap] + TabOrder = 4 + Position.X = 11.000000000000000000 + Position.Y = 77.000000000000000000 + Size.Width = 155.000000000000000000 + Size.Height = 22.000000000000000000 + Size.PlatformDefault = False + OnExit = IconNameExit + end + object IconNameLabel: TLabel + Position.X = 11.000000000000000000 + Position.Y = 61.000000000000000000 + Size.Width = 74.000000000000000000 + Size.Height = 17.000000000000000000 + Size.PlatformDefault = False + Text = 'IconName' + TabOrder = 3 + end + object OpacityLabel: TLabel + Position.X = 11.000000000000000000 + Position.Y = 18.000000000000000000 + Size.Width = 97.000000000000000000 + Size.Height = 17.000000000000000000 + Size.PlatformDefault = False + Text = '% Opacity' + TabOrder = 0 + end + object OpacitySpinBox: TSpinBox + Touch.InteractiveGestures = [LongTap, DoubleTap] + TabOrder = 1 + Cursor = crIBeam + Value = 100.000000000000000000 + Position.X = 11.000000000000000000 + Position.Y = 36.000000000000000000 + Size.Width = 77.000000000000000000 + Size.Height = 22.000000000000000000 + Size.PlatformDefault = False + OnChange = OpacitySpinBoxChange + end + object SVGText: TMemo + Touch.InteractiveGestures = [Pan, LongTap, DoubleTap] + DataDetectorTypes = [] + Anchors = [akLeft, akTop, akRight, akBottom] + Position.X = 176.000000000000000000 + Position.Y = 16.000000000000000000 + Size.Width = 471.000000000000000000 + Size.Height = 137.000000000000000000 + Size.PlatformDefault = False + TabOrder = 7 + OnExit = SVGTextExit + Viewport.Width = 467.000000000000000000 + Viewport.Height = 133.000000000000000000 + end + object GrayScaleItemCheckBox: TCheckBox + Position.X = 90.000000000000000000 + Position.Y = 41.000000000000000000 + Size.Width = 78.000000000000000000 + Size.Height = 19.000000000000000000 + Size.PlatformDefault = False + TabOrder = 2 + Text = 'GrayScale' + OnChange = GrayScaleItemCheckBoxChange + end + object FixedColorItemLabel: TLabel + Position.X = 10.000000000000000000 + Position.Y = 99.000000000000000000 + Size.Width = 107.000000000000000000 + Size.Height = 17.000000000000000000 + Size.PlatformDefault = False + Text = 'Fixed Color' + TabOrder = 5 + end + object FixedColorItemComboBox: TComboBox + Position.X = 11.000000000000000000 + Position.Y = 116.000000000000000000 + Size.Width = 154.000000000000000000 + Size.Height = 22.000000000000000000 + Size.PlatformDefault = False + TabOrder = 6 + OnChange = FixedColorItemComboBoxChange + end + end + object IconPanel: TPanel + Align = Left + Margins.Left = 8.000000000000000000 + Margins.Top = 8.000000000000000000 + Margins.Right = 8.000000000000000000 + Margins.Bottom = 8.000000000000000000 + Position.X = 8.000000000000000000 + Position.Y = 8.000000000000000000 + Size.Width = 128.000000000000000000 + Size.Height = 144.000000000000000000 + Size.PlatformDefault = False + TabOrder = 0 + object IconImage: TGlyph + Margins.Left = 4.000000000000000000 + Margins.Top = 4.000000000000000000 + Margins.Right = 4.000000000000000000 + Margins.Bottom = 4.000000000000000000 + Align = Top + Position.X = 4.000000000000000000 + Position.Y = 4.000000000000000000 + Size.Width = 120.000000000000000000 + Size.Height = 120.000000000000000000 + Size.PlatformDefault = False + ImageIndex = 1 + end + end + end + object BottomSplitter: TSplitter + Align = Bottom + Cursor = crVSplit + MinSize = 160.000000000000000000 + Position.Y = 435.000000000000000000 + Size.Width = 800.000000000000000000 + Size.Height = 6.000000000000000000 + Size.PlatformDefault = False + end end diff --git a/Packages/FMX.SVGIconImageListEditorUnit.pas b/Packages/FMX.SVGIconImageListEditorUnit.pas index 1b417de0..5d3606d7 100644 --- a/Packages/FMX.SVGIconImageListEditorUnit.pas +++ b/Packages/FMX.SVGIconImageListEditorUnit.pas @@ -39,42 +39,49 @@ interface type TSVGIconImageListEditorFMX = class(TForm) - PaButtons: TPanel; - AddButton: TButton; - DeleteButton: TButton; - ClearAllButton: TButton; - paTop: TPanel; - Panel4: TPanel; + ListBoxItemStyleBook: TStyleBook; + OpenDialog: TOpenDialog; + BottomPanel: TPanel; OKButton: TButton; CancelButton: TButton; HelpButton: TButton; + TopPanel: TPanel; + ButtonsPanel: TPanel; + AddButton: TButton; + DeleteButton: TButton; + ClearAllButton: TButton; + NewButton: TButton; paClient: TPanel; ImageListGroupBox: TGroupBox; AutoSizeCheckBox: TCheckBox; DefaultOpacitySpinBox: TSpinBox; DefaultOpacityLabel: TLabel; + SizeSpinBox: TSpinBox; + SizeLabel: TLabel; + FixedColorComboBox: TComboBox; + FixedColorLabel: TLabel; + GrayScaleCheckBox: TCheckBox; + ItemPanel: TPanel; ItemGroupBox: TGroupBox; IconName: TEdit; IconNameLabel: TLabel; OpacityLabel: TLabel; OpacitySpinBox: TSpinBox; - IconPanel: TPanel; - IconImage: TGlyph; - ListBoxItemStyleBook: TStyleBook; - SizeSpinBox: TSpinBox; - SizeLabel: TLabel; - IconsGroupBox: TGroupBox; - ImageView: TListBox; - TopSplitter: TSplitter; SVGText: TMemo; - NewButton: TButton; - OpenDialog: TOpenDialog; - FixedColorComboBox: TComboBox; - FixedColorLabel: TLabel; - GrayScaleCheckBox: TCheckBox; GrayScaleItemCheckBox: TCheckBox; FixedColorItemLabel: TLabel; FixedColorItemComboBox: TComboBox; + IconPanel: TPanel; + IconImage: TGlyph; + WidthLabel: TLabel; + WidthSpinBox: TSpinBox; + HeightLabel: TLabel; + HeightSpinBox: TSpinBox; + ZoomLabel: TLabel; + ZoomSpinBox: TSpinBox; + IconsGroupBox: TGroupBox; + ImageView: TListBox; + BottomSplitter: TSplitter; procedure ClearAllButtonClick(Sender: TObject); procedure DeleteButtonClick(Sender: TObject); procedure AddButtonClick(Sender: TObject); @@ -102,11 +109,12 @@ TSVGIconImageListEditorFMX = class(TForm) var Allow: Boolean); procedure ImageViewDragDrop(Sender: TObject; const Data: TDragObject; const Point: TPointF); + procedure ZoomChange(Sender: TObject); private FIconIndexLabel: string; FTotIconsLabel: string; FUpdating: Boolean; - SVGIconImageList: TSVGIconImageList; + FEditingList: TSVGIconImageList; procedure AddNewItem; procedure DeleteSelectedItem; procedure ClearAllImages; @@ -128,12 +136,13 @@ implementation Winapi.Messages , Winapi.Windows , Winapi.shellApi + , System.Math , SVG , SVGColor; var SavedBounds: TRect = (Left: 0; Top: 0; Right: 0; Bottom: 0); - paTopHeight: Single; + ItemPanelHeight: Single; function UpdateSVGIconListView(const AListBox: TListBox): Integer; var @@ -199,8 +208,12 @@ function EditSVGIconImageList(const AImageList: TSVGIconImageList): Boolean; try //Screen.Cursor := crHourglass; try - SVGIconImageList.Assign(AImageList); - ImageView.Images := SVGIconImageList; + FEditingList.Assign(AImageList); + SizeSpinBox.Value := Max(FEditingList.Width, FEditingList.Height); + WidthSpinBox.Value := FEditingList.Width; + HeightSpinBox.Value := FEditingList.Height; + ZoomSpinBox.Value := FEditingList.Zoom; + ImageView.Images := FEditingList; UpdateSVGIconListView(ImageView); //UpdateGUI; if ImageView.Items.Count > 0 then @@ -214,13 +227,13 @@ function EditSVGIconImageList(const AImageList: TSVGIconImageList): Boolean; begin //Screen.Cursor := crHourglass; try - AImageList.Assign(SVGIconImageList); + AImageList.Assign(FEditingList); finally //Screen.Cursor := crDefault; end; end; SavedBounds := Bounds; - paTopHeight := paTop.Height; + ItemPanelHeight := ItemPanel.Height; finally DisposeOf; end; @@ -238,8 +251,16 @@ procedure TSVGIconImageListEditorFMX.HelpButtonClick(Sender: TObject); procedure TSVGIconImageListEditorFMX.SizeChange(Sender: TObject); begin - SVGIconImageList.Size := Round(SizeSpinBox.Value); - UpdateGUI; + if not FUpdating then + begin + if Sender = SizeSpinBox then + FEditingList.Size := Round(SizeSpinBox.Value); + if Sender = WidthSpinBox then + FEditingList.Width := Round(WidthSpinBox.Value); + if Sender = HeightSpinBox then + FEditingList.Height := Round(HeightSpinBox.Value); + UpdateGUI; + end; end; procedure TSVGIconImageListEditorFMX.SVGTextExit(Sender: TObject); @@ -250,7 +271,7 @@ procedure TSVGIconImageListEditorFMX.SVGTextExit(Sender: TObject); procedure TSVGIconImageListEditorFMX.AutoSizeCheckBoxClick(Sender: TObject); begin - SVGIconImageList.AutoSizeBitmaps := AutoSizeCheckBox.IsChecked; + FEditingList.AutoSizeBitmaps := AutoSizeCheckBox.IsChecked; UpdateGUI; end; @@ -274,21 +295,26 @@ procedure TSVGIconImageListEditorFMX.UpdateGUI; begin FUpdating := True; try + SizeSpinBox.Value := Max(FEditingList.Width, FEditingList.Height); + WidthSpinBox.Value := FEditingList.Width; + HeightSpinBox.Value := FEditingList.Height; + ZoomSpinBox.Value := FEditingList.Zoom; + ImageView.ItemHeight := SizeSpinBox.Value; LIconItem := SelectedSVGIcon; LIsItemSelected := LIconItem <> nil; - ClearAllButton.Enabled := SVGIconImageList.Count > 0; + ClearAllButton.Enabled := FEditingList.Count > 0; DeleteButton.Enabled := LIsItemSelected; OpacitySpinBox.Enabled := LIsItemSelected; IconName.Enabled := LIsItemSelected; SVGText.Enabled := LIsItemSelected; - //ShowCharMapButton.Enabled := (SVGIconImageList.FontName <> ''); - IconsGroupBox.Text := Format(FTotIconsLabel, [SVGIconImageList.Count]); - SizeSpinBox.Value := SVGIconImageList.Size; - AutoSizeCheckBox.IsChecked := SVGIconImageList.AutoSizeBitmaps; - DefaultOpacitySpinBox.Value := SVGIconImageList.Opacity * 100; + //ShowCharMapButton.Enabled := (FEditingList.FontName <> ''); + IconsGroupBox.Text := Format(FTotIconsLabel, [FEditingList.Count]); + SizeSpinBox.Value := FEditingList.Size; + AutoSizeCheckBox.IsChecked := FEditingList.AutoSizeBitmaps; + DefaultOpacitySpinBox.Value := FEditingList.Opacity * 100; FixedColorComboBox.ItemIndex := - FixedColorComboBox.Items.IndexOfObject(TObject(SVGIconImageList.FixedColor)); - GrayScaleCheckBox.IsChecked := SVGIconImageList.GrayScale; + FixedColorComboBox.Items.IndexOfObject(TObject(FEditingList.FixedColor)); + GrayScaleCheckBox.IsChecked := FEditingList.GrayScale; if LIsItemSelected then begin ItemGroupBox.Text := Format(FIconIndexLabel,[LIconItem.Index]); @@ -312,12 +338,18 @@ procedure TSVGIconImageListEditorFMX.UpdateGUI; end; end; +procedure TSVGIconImageListEditorFMX.ZoomChange(Sender: TObject); +begin + if not FUpdating then + FEditingList.Zoom := Round(ZoomSpinBox.Value); +end; + procedure TSVGIconImageListEditorFMX.DeleteSelectedItem; var LIndex: Integer; begin LIndex := ImageView.Selected.Index; - SVGIconImageList.DeleteIcon(LIndex); + FEditingList.DeleteIcon(LIndex); UpdateSVGIconListView(ImageView); if LIndex < ImageView.Items.Count then ImageView.ItemIndex := LIndex @@ -335,7 +367,7 @@ procedure TSVGIconImageListEditorFMX.ClearAllImages; begin //Screen.Cursor := crHourglass; try - SVGIconImageList.ClearIcons; + FEditingList.ClearIcons; finally //Screen.Cursor := crDefault; end; @@ -349,7 +381,7 @@ procedure TSVGIconImageListEditorFMX.CloseCharMap(Sender: TObject; begin if FCharMap.CharsEdit.Text <> '' then begin - SVGIconImageList.AddIcons(FCharMap.CharsEdit.Text, FCharMap.DefaultFontName.Text); + FEditingList.AddIcons(FCharMap.CharsEdit.Text, FCharMap.DefaultFontName.Text); UpdateSVGIconListView(ImageView); end; end; @@ -392,20 +424,20 @@ procedure TSVGIconImageListEditorFMX.ImageViewDragChange(SourceItem, LSourceIndex := SourceItem.Index; LNewIndex := DestItem.Index; if LNewIndex < 0 then LNewIndex := 0; - if LNewIndex > SVGIconImageList.Count then LNewIndex := SVGIconImageList.Count; + if LNewIndex > FEditingList.Count then LNewIndex := FEditingList.Count; - LOriginalIcon := SVGIconImageList.Source.Items[LSourceIndex] as TSVGIconSourceItem; + LOriginalIcon := FEditingList.Source.Items[LSourceIndex] as TSVGIconSourceItem; LIconName := LOriginalIcon.IconName; if LSourceIndex < LNewIndex then begin - LIcon := SVGIconImageList.CloneIcon(LSourceIndex, LNewIndex + 1); - SVGIconImageList.DeleteIcon(LSourceIndex); + LIcon := FEditingList.CloneIcon(LSourceIndex, LNewIndex + 1); + FEditingList.DeleteIcon(LSourceIndex); end else begin - LIcon := SVGIconImageList.CloneIcon(LSourceIndex, LNewIndex); - SVGIconImageList.DeleteIcon(LSourceIndex + 1); + LIcon := FEditingList.CloneIcon(LSourceIndex, LNewIndex); + FEditingList.DeleteIcon(LSourceIndex + 1); end; LIcon.IconName := LIconName; @@ -423,7 +455,7 @@ procedure TSVGIconImageListEditorFMX.ImageViewDragDrop(Sender: TObject; LFiles := TStringList.Create; LFiles.AddStrings(TArray(Data.Files)); try - SVGIconImageList.LoadFromFiles(LFiles); + FEditingList.LoadFromFiles(LFiles); finally FreeAndNil(LFiles); end; @@ -471,7 +503,7 @@ procedure TSVGIconImageListEditorFMX.FixedColorComboBoxChange(Sender: TObject); //Screen.Cursor := crHourGlass; try if FixedColorComboBox.ItemIndex >= 0 then begin - SVGIconImageList.FixedColor := + FEditingList.FixedColor := TColor(FixedColorComboBox.Items.Objects[FixedColorComboBox.ItemIndex]); UpdateGUI; end; @@ -504,17 +536,18 @@ procedure TSVGIconImageListEditorFMX.FormCreate(Sender: TObject); begin Caption := Format(Caption, [SVGIconImageListVersion]); FUpdating := True; - SVGIconImageList := TSVGIconImageList.Create(nil); + FEditingList := TSVGIconImageList.Create(nil); FIconIndexLabel := ItemGroupBox.Text; FTotIconsLabel := IconsGroupBox.Text; - IconImage.Images := SVGIconImageList; + IconImage.Images := FEditingList; + BottomSplitter.Position.X := 1; AssignSVGColorList(FixedColorComboBox.Items); AssignSVGColorList(FixedColorItemComboBox.Items); end; procedure TSVGIconImageListEditorFMX.FormDestroy(Sender: TObject); begin - FreeAndNil(SVGIconImageList); + FreeAndNil(FEditingList); //Screen.Cursors[crColorPick] := 0; end; @@ -528,8 +561,8 @@ procedure TSVGIconImageListEditorFMX.FormResize(Sender: TObject); function TSVGIconImageListEditorFMX.SelectedSVGIcon: TSVGIconSourceItem; begin - if (ImageView.Selected <> nil) and (ImageView.Selected.Index < SVGIconImageList.Source.Count) then - Result := SVGIconImageList.Source.Items[ImageView.Selected.Index] as TSVGIconSourceItem + if (ImageView.Selected <> nil) and (ImageView.Selected.Index < FEditingList.Source.Count) then + Result := FEditingList.Source.Items[ImageView.Selected.Index] as TSVGIconSourceItem else Result := nil; end; @@ -540,7 +573,7 @@ procedure TSVGIconImageListEditorFMX.AddButtonClick(Sender: TObject); begin //Screen.Cursor := crHourGlass; try - SVGIconImageList.LoadFromFiles(OpenDialog.Files); + FEditingList.LoadFromFiles(OpenDialog.Files); finally UpdateSVGIconListView(ImageView); //Screen.Cursor := crDefault; @@ -553,8 +586,8 @@ procedure TSVGIconImageListEditorFMX.FormShow(Sender: TObject); if SavedBounds.Right - SavedBounds.Left > 0 then SetBounds(SavedBounds.Left, SavedBounds.Top, SavedBounds.Width, SavedBounds.Height); - if paTopHeight <> 0 then - paTop.Height := paTopHeight; + if ItemPanelHeight <> 0 then + ItemPanel.Height := ItemPanelHeight; if ImageView.CanFocus then ImageView.SetFocus; @@ -562,7 +595,7 @@ procedure TSVGIconImageListEditorFMX.FormShow(Sender: TObject); procedure TSVGIconImageListEditorFMX.GrayScaleCheckBoxChange(Sender: TObject); begin - SVGIconImageList.GrayScale := GrayScaleCheckBox.IsChecked; + FEditingList.GrayScale := GrayScaleCheckBox.IsChecked; UpdateGUI; end; @@ -582,12 +615,12 @@ procedure TSVGIconImageListEditorFMX.AddNewItem; LInsertIndex := ImageView.Selected.Index +1 else LInsertIndex := ImageView.Items.Count; - SVGIconImageList.InsertIcon(LInsertIndex,'',''); + FEditingList.InsertIcon(LInsertIndex,'',''); UpdateSVGIconListView(ImageView); ImageView.ItemIndex := LInsertIndex; end; initialization - paTopHeight := 0; + ItemPanelHeight := 0; end. diff --git a/Source/FMX.SVGIconImage.pas b/Source/FMX.SVGIconImage.pas index 3534b8f1..c2d38b74 100644 --- a/Source/FMX.SVGIconImage.pas +++ b/Source/FMX.SVGIconImage.pas @@ -51,12 +51,17 @@ interface , SVG ; +const + DEFAULT_SIZE = 32; + ZOOM_DEFAULT = 100; + type TSVGIconFixedMultiResBitmap = class; TSVGIconFixedBitmapItem = class(TFixedBitmapItem) private - FSize: Integer; + FWidth, FHeight: Single; + FZoom: Integer; FOpacity: Single; FOwnerCollection: TSVGIconFixedMultiResBitmap; FIconName: string; @@ -64,7 +69,9 @@ TSVGIconFixedBitmapItem = class(TFixedBitmapItem) function StoreOpacity: Boolean; procedure SetBitmap(const AValue: TBitmapOfItem); function GetBitmap: TBitmapOfItem; - procedure SetSize(const AValue: Integer); + procedure SetIconSize(const AWidth, AHeight: Single; + const AZoom: Integer); + procedure DrawSVGIcon; procedure SetOpacity(const AValue: Single); procedure SetIconName(const AValue: string); function GetSVGText: string; @@ -74,13 +81,12 @@ TSVGIconFixedBitmapItem = class(TFixedBitmapItem) function GetDisplayName: string; override; public constructor Create(Collection: TCollection); override; + procedure Assign(Source: TPersistent); override; destructor Destroy; override; - procedure DrawSVGIcon; property SVG: TSVG read FSVG; published property Bitmap: TBitmapOfItem read GetBitmap write SetBitmap stored False; property Opacity: Single read FOpacity write SetOpacity stored StoreOpacity; - property Size: Integer read FSize write SetSize; property IconName: string read FIconName write SetIconName; property SVGText: string read GetSVGText write SetSVGText; end; @@ -91,7 +97,9 @@ TSVGIconImage = class; TSVGIconFixedMultiResBitmap = class(TFixedMultiResBitmap) private FOwnerImage: TSVGIconImage; - procedure UpdateImageSize(const ASize: Integer); + procedure OnDrawImage(Sender: TObject); + procedure UpdateImageSize(const AWidth, AHeight: Single; + const AZoom: Integer); public constructor Create(AOwner: TPersistent; ItemClass: TSVGIconFixedBitmapItemClass); overload; constructor Create(AOwner: TPersistent); overload; @@ -99,9 +107,11 @@ TSVGIconFixedMultiResBitmap = class(TFixedMultiResBitmap) TSVGIconImage = class(TImage) private + FZoom: Integer; FSVGIconMultiResBitmap: TSVGIconFixedMultiResBitmap; - function GetBitmapSize: Integer; - procedure SetBitmapSize(const AValue: Integer); + procedure SetBitmapZoom(const AValue: Integer); + procedure SetIconSize(const AWidth, AHeight: Single; + const AZoom: Integer); protected function CreateMultiResBitmap: TFixedMultiResBitmap; override; public @@ -109,7 +119,7 @@ TSVGIconImage = class(TImage) destructor Destroy; override; procedure SetBounds(X, Y, AWidth, AHeight: Single); override; published - property BitmapSize: Integer read GetBitmapSize write SetBitmapSize; + property BitmapZoom: Integer read FZoom write SetBitmapZoom default ZOOM_DEFAULT; end; implementation @@ -133,6 +143,12 @@ constructor TSVGIconFixedMultiResBitmap.Create(AOwner: TPersistent); FOwnerImage := TSVGIconImage(AOwner); end; +procedure TSVGIconFixedMultiResBitmap.OnDrawImage(Sender: TObject); +begin + if Assigned(FOwnerImage) then + FOwnerImage.Repaint; +end; + constructor TSVGIconFixedMultiResBitmap.Create(AOwner: TPersistent; ItemClass: TSVGIconFixedBitmapItemClass); begin inherited Create(AOwner, ItemClass); @@ -140,7 +156,8 @@ constructor TSVGIconFixedMultiResBitmap.Create(AOwner: TPersistent; ItemClass: T FOwnerImage := TSVGIconImage(AOwner); end; -procedure TSVGIconFixedMultiResBitmap.UpdateImageSize(const ASize: Integer); +procedure TSVGIconFixedMultiResBitmap.UpdateImageSize(const AWidth, AHeight: Single; + const AZoom: Integer); var I, J: Integer; LItem: TFixedBitmapItem; @@ -151,13 +168,25 @@ procedure TSVGIconFixedMultiResBitmap.UpdateImageSize(const ASize: Integer); begin LItem := Items[J]; if LItem is TSVGIconFixedBitmapItem then - TSVGIconFixedBitmapItem(LItem).Size := ASize; + TSVGIconFixedBitmapItem(LItem).SetIconSize(AWidth, AHeight, AZoom); end; end; end; { TSVGIconFixedBitmapItem } +procedure TSVGIconFixedBitmapItem.Assign(Source: TPersistent); +begin + if Source is TSVGIconSourceItem then + begin + Opacity := TSVGIconSourceItem(Source).Opacity; + IconName := TSVGIconSourceItem(Source).IconName; + SVGText := TSVGIconSourceItem(Source).SVGText; + end + else + inherited; +end; + function TSVGIconFixedBitmapItem.BitmapStored: Boolean; begin Result := False; @@ -168,7 +197,7 @@ constructor TSVGIconFixedBitmapItem.Create(Collection: TCollection); inherited; if Collection is TSVGIconFixedMultiResBitmap then FOwnerCollection := Collection as TSVGIconFixedMultiResBitmap; - FSize := 16; + FZoom := ZOOM_DEFAULT; FOpacity := 1; FSVG := TSVG.Create; end; @@ -182,14 +211,24 @@ destructor TSVGIconFixedBitmapItem.Destroy; procedure TSVGIconFixedBitmapItem.DrawSVGIcon; var LBitmap: TBitmap; - LBitmapSize: Single; + LBitmapWidth, LBitmapHeight: Integer; begin + if (FWidth <= 0) or (FHeight <= 0) or (FZoom <= 0) or (FZoom >= 100) then + Exit; LBitmap := inherited Bitmap; - LBitmap.Clear(talphacolors.Null); - LBitmapSize := Size * Scale; - LBitmap.Width := Round(LBitmapSize); - LBitmap.Height := Round(LBitmapSize); - PaintToBitmap(LBitmap, FSVG); + LBitmapWidth := Round(FWidth * Scale); + LBitmapHeight := Round(FHeight * Scale); + LBitmap.Width := LBitmapWidth; + LBitmap.Height := LBitmapHeight; + LBitmap.Canvas.BeginScene; + try + LBitmap.Clear(talphacolors.Null); + PaintToBitmap(LBitmap, FSVG, FZoom); + finally + LBitmap.Canvas.EndScene; + if Assigned(FOwnerCollection) then + FOwnerCollection.OnDrawImage(Self); + end; end; function TSVGIconFixedBitmapItem.GetBitmap: TBitmapOfItem; @@ -219,21 +258,29 @@ procedure TSVGIconFixedBitmapItem.SetIconName(const AValue: string); FIconName := AValue; end; -procedure TSVGIconFixedBitmapItem.SetOpacity(const AValue: Single); + +procedure TSVGIconFixedBitmapItem.SetSVGText(const Value: string); begin - FOpacity := AValue; - DrawSVGIcon; + FSVG.LoadFromText(Value); end; -procedure TSVGIconFixedBitmapItem.SetSize(const AValue: Integer); +procedure TSVGIconFixedBitmapItem.SetIconSize(const AWidth, AHeight:Single; + const AZoom: Integer); begin - FSize := AValue; - DrawSVGIcon; + if (AWidth <> 0) and (AHeight <> 0) and + ((AWidth <> FWidth) or (AHeight <> FHeight) or (AZoom <> FZoom)) then + begin + FWidth := AWidth; + FHeight := AHeight; + FZoom := AZoom; + DrawSVGIcon; + end; end; -procedure TSVGIconFixedBitmapItem.SetSVGText(const Value: string); +procedure TSVGIconFixedBitmapItem.SetOpacity(const AValue: Single); begin - FSVG.LoadFromText(Value); + FOpacity := AValue; + DrawSVGIcon; end; function TSVGIconFixedBitmapItem.StoreOpacity: Boolean; @@ -248,6 +295,7 @@ constructor TSVGIconImage.Create(AOwner: TComponent); inherited; DisableInterpolation := True; FSVGIconMultiResBitmap := MultiResBitmap as TSVGIconFixedMultiResBitmap; + FZoom := ZOOM_DEFAULT; end; function TSVGIconImage.CreateMultiResBitmap: TFixedMultiResBitmap; @@ -261,21 +309,25 @@ destructor TSVGIconImage.Destroy; FSVGIconMultiResBitmap := nil; end; -function TSVGIconImage.GetBitmapSize: Integer; +procedure TSVGIconImage.SetIconSize(const AWidth, AHeight: Single; + const AZoom: Integer); begin - Result := Round(Inherited width); + inherited Width := AWidth; + inherited height := AHeight; + FZoom := AZoom; + FSVGIconMultiResBitmap.UpdateImageSize(AWidth, AHeight, AZoom); end; -procedure TSVGIconImage.SetBitmapSize(const AValue: Integer); +procedure TSVGIconImage.SetBounds(X, Y, AWidth, AHeight: Single); begin - if (AValue <> 0) and not (csLoading in Self.ComponentState) then - FSVGIconMultiResBitmap.UpdateImageSize(AValue); + inherited; + SetIconSize(AWidth, AHeight, FZoom); end; -procedure TSVGIconImage.SetBounds(X, Y, AWidth, AHeight: Single); +procedure TSVGIconImage.SetBitmapZoom(const AValue: Integer); begin - inherited; - BitmapSize := Round(Min(AWidth, AHeight)); + if (FZoom <> AValue) and (AValue <= 100) and (AValue >= 10) then + SetIconSize(Width, Height, AValue); end; initialization diff --git a/Source/FMX.SVGIconImageList.pas b/Source/FMX.SVGIconImageList.pas index eb50d6b5..bbe12a69 100644 --- a/Source/FMX.SVGIconImageList.pas +++ b/Source/FMX.SVGIconImageList.pas @@ -55,7 +55,9 @@ interface ; const - SVGIconImageListVersion = '2.2.1'; + SVGIconImageListVersion = '2.2.2'; + DEFAULT_SIZE = 32; + ZOOM_DEFAULT = 100; resourcestring ERROR_LOADING_FILES = 'SVG error loading files:'; @@ -67,17 +69,26 @@ TSVGIconSourceItem = class; TSVGIconBitmapItem = class(TCustomBitmapItem) private - FSize: Integer; + FWidth, FHeight, FZoom: Integer; FOwnerMultiResBitmap: TSVGIconMultiResBitmap; procedure SetBitmap(const AValue: TBitmapOfItem); function GetBitmap: TBitmapOfItem; procedure SetSize(const AValue: Integer); procedure DrawSVGIcon; - function GetOpacity: single; - function GetSize: Integer; function GetSVG: TSVG; function GetGrayScale: Boolean; - function GetSVGColor: TColor; + function GetSVGColor: TAlphaColor; + function GetOpacity: single; + function GetSize: Integer; + procedure SetIconSize(const AWidth, AHeight, AZoom: Integer); + function GetHeight: Integer; + function GetWidth: Integer; + procedure SetHeight(const AValue: Integer); + procedure SetWidth(const AValue: Integer); + function StoreWidth: Boolean; + function StoreHeight: Boolean; + function StoreSize: Boolean; + procedure SetZoom(const AValue: Integer); protected function BitmapStored: Boolean; override; function GetDisplayName: string; override; @@ -87,11 +98,14 @@ TSVGIconBitmapItem = class(TCustomBitmapItem) published property Bitmap: TBitmapOfItem read GetBitmap write SetBitmap stored False; property Scale; - property Size: Integer read GetSize write SetSize default 32; + property Size: Integer read GetSize write SetSize stored StoreSize default DEFAULT_SIZE; + property Width: Integer read GetWidth write SetWidth stored StoreWidth default DEFAULT_SIZE; + property Height: Integer read GetHeight write SetHeight stored StoreHeight default DEFAULT_SIZE; + property Zoom: Integer read FZoom write SetZoom default ZOOM_DEFAULT; //Readonly properties from Source Item - property Opacity: single read GetOpacity stored false; - property FixedColor: TColor read GetSVGColor stored false; + property FixedColor: TAlphaColor read GetSVGColor stored false; property GrayScale: Boolean read GetGrayScale stored false; + property Opacity: single read GetOpacity stored false; end; TSVGIconBitmapItemClass = class of TSVGIconBitmapItem; @@ -99,7 +113,7 @@ TSVGIconBitmapItemClass = class of TSVGIconBitmapItem; TSVGIconMultiResBitmap = class(TMultiResBitmap) private FOwnerSourceItem: TSVGIconSourceItem; - procedure UpdateImageSize(const ASize: Integer); + procedure UpdateImageSize(const AWidth, AHeight, AZoom: Integer); protected constructor Create(AOwner: TPersistent; ItemClass: TSVGIconBitmapItemClass); overload; public @@ -111,22 +125,24 @@ TSVGIconSourceItem = class(TCustomSourceItem) FOwnerImageList: TSVGIconImageList; FSVG: TSVG; FOpacity: single; - FFixedColor: TColor; + FFixedColor: TAlphaColor; FGrayScale: Boolean; procedure UpdateAllItems; + function GetSVGText: string; + procedure SetFixedColor(const Value: TAlphaColor); + procedure SetGrayScale(const Value: Boolean); + function GetFixedColor: TAlphaColor; + function GetGrayScale: Boolean; + procedure SetSVG(const Value: TSVG); + procedure SetSVGText(const Value: string); procedure SetOpacity(const AValue: single); - procedure AutoSizeBitmap(const ASize: Integer); + procedure AutoSizeBitmap(const AWidth, AHeight, AZoom: Integer); function GetIconName: string; procedure SetIconName(const Value: string); function GetOpacity: single; function GetDestinationItem: TCustomDestinationItem; - procedure SetSVG(const Value: TSVG); - procedure SetSVGText(const Value: string); - function GetSVGText: string; - procedure SetFixedColor(const Value: TColor); - procedure SetGrayScale(const Value: Boolean); - function GetFixedColor: TColor; - function GetGrayScale: Boolean; + procedure UpdateIconAttributes(const AFixedColor: TAlphaColor; + const AReplaceFixedColor: Boolean = False); protected function GetDisplayName: string; override; function CreateMultiResBitmap: TMultiResBitmap; override; @@ -139,29 +155,39 @@ TSVGIconSourceItem = class(TCustomSourceItem) published property MultiResBitmap; property IconName: string read GetIconName write SetIconName; - property Opacity: single read GetOpacity write SetOpacity stored StoreOpacity; property SVGText: string read GetSVGText write SetSVGText; - property FixedColor: TColor read GetFixedColor write SetFixedColor default SVG_INHERIT_COLOR; + property FixedColor: TAlphaColor read GetFixedColor write SetFixedColor default SVG_INHERIT_COLOR; property GrayScale: Boolean read GetGrayScale write SetGrayScale default False; + property Opacity: single read GetOpacity write SetOpacity stored StoreOpacity; end; {TSVGIconImageList} TSVGIconImageList = class(TCustomImageList) private - FSize: Integer; + FWidth, FHeight: Integer; FAutoSizeBitmaps: Boolean; - FOpacity: single; - FFixedColor: TColor; + FFixedColor: TAlphaColor; FGrayScale: Boolean; + FOpacity: single; + FZoom: Integer; function StoreOpacity: Boolean; procedure SetAutoSizeBitmaps(const Value: Boolean); + procedure SetFixedColor(const Value: TAlphaColor); procedure UpdateSourceItems; - procedure UpdateDestination(Size: TSize; const Index: Integer); + procedure UpdateDestination(ASize: TSize; const Index: Integer); + procedure SetGrayScale(const Value: Boolean); procedure SetOpacity(const Value: single); + procedure SetIconSize(const AWidth, AHeight: Integer); function GetSize: Integer; - procedure SetSize(const Value: Integer); - procedure SetFixedColor(const Value: TColor); - procedure SetGrayScale(const Value: Boolean); + procedure SetSize(const AValue: Integer); + function GetHeight: Integer; + function GetWidth: Integer; + procedure SetHeight(const AValue: Integer); + procedure SetWidth(const AValue: Integer); + procedure SetZoom(const AValue: Integer); + function StoreWidth: Boolean; + function StoreHeight: Boolean; + function StoreSize: Boolean; protected procedure Loaded; override; function CreateSource: TSourceCollection; override; @@ -179,18 +205,23 @@ TSVGIconImageList = class(TCustomImageList) procedure ClearIcons; virtual; procedure UpdateIconAttributes(const ASize: Integer; const AOpacity: Single); overload; published + //Publishing properties of standard ImageList property Source; + property Width: Integer read GetWidth write SetWidth stored StoreWidth default DEFAULT_SIZE; + property Height: Integer read GetHeight write SetHeight stored StoreHeight default DEFAULT_SIZE; + property Zoom: Integer read FZoom write SetZoom default ZOOM_DEFAULT; property Destination; property OnChange; property OnChanged; - property Size: Integer read GetSize write SetSize default 32; + property Size: Integer read GetSize write SetSize stored StoreSize default DEFAULT_SIZE; property AutoSizeBitmaps: Boolean read FAutoSizeBitmaps write SetAutoSizeBitmaps default True; - property Opacity: single read FOpacity write SetOpacity stored StoreOpacity; - property FixedColor: TColor read FFixedColor write SetFixedColor default SVG_INHERIT_COLOR; + property FixedColor: TAlphaColor read FFixedColor write SetFixedColor default SVG_INHERIT_COLOR; property GrayScale: Boolean read FGrayScale write SetGrayScale default False; + property Opacity: single read FOpacity write SetOpacity stored StoreOpacity; end; -procedure PaintToBitmap(const ABitmap: TBitmap; const ASVG: TSVG); +procedure PaintToBitmap(const ABitmap: TBitmap; const ASVG: TSVG; + const AZoom: Integer); implementation @@ -205,7 +236,8 @@ implementation ; -procedure PaintToBitmap(const ABitmap: TBitmap; const ASVG: TSVG); +procedure PaintToBitmap(const ABitmap: TBitmap; const ASVG: TSVG; + const AZoom: Integer); var GPGraphics: TGPGraphics; GPBitmap: TGPBitmap; @@ -218,18 +250,22 @@ procedure PaintToBitmap(const ABitmap: TBitmap; const ASVG: TSVG); Source: PByte; Dest: PByte; Y: Integer; + LRect: TRectF; + LWidth, LHeight: Integer; begin - GPBitmap := TGPBitmap.Create(ABitmap.Canvas.Width, ABitmap.Canvas.Height); + LWidth := ABitmap.Canvas.Width; + LHeight := ABitmap.Canvas.Height; + GPBitmap := TGPBitmap.Create(LWidth, LHeight); GPGraphics := TGPGraphics.Create(GPBitmap); try GPGraphics.SetSmoothingMode(SmoothingModeAntiAlias); GPGraphics.SetPixelOffsetMode(PixelOffsetModeHalf); - GPRectF.X := 0; - GPRectF.Y := 0; - GPRectF.Width := ABitmap.Width; - GPRectF.Height := ABitmap.Height; - - RectArray := TRectArray.Create(TRect.Create(0, 0, ABitmap.Width, ABitmap.Height)); + GPRectF.Width := LWidth / 100 * AZoom; + GPRectF.Height := LHeight / 100 * AZoom; + GPRectF.X := (LWidth - GPRectF.Width) / 2; + GPRectF.Y := (LHeight - GPRectF.Height) / 2; + LRect := TRect.Create(0, 0, LWidth, LHeight); + RectArray := TRectArray.Create(LRect); ASVG.PaintTo(GPGraphics, GPRectF, @RectArray, 1); GPRect.X := 0; @@ -283,24 +319,27 @@ function TSVGIconBitmapItem.BitmapStored: Boolean; constructor TSVGIconBitmapItem.Create(Collection: TCollection); begin inherited; + FWidth := DEFAULT_SIZE; + FHeight := DEFAULT_SIZE; + FZoom := ZOOM_DEFAULT; if Collection is TSVGIconMultiResBitmap then FOwnerMultiResBitmap := Collection as TSVGIconMultiResBitmap; - FSize := 32; end; procedure TSVGIconBitmapItem.DrawSVGIcon; var LBitmap: TBitmap; - LBitmapSize: Integer; + LBitmapWidth, LBitmapHeight: Integer; begin LBitmap := inherited Bitmap; - LBitmapSize := Round(Size * Scale); - LBitmap.Width := LBitmapSize; - LBitmap.Height := LBitmapSize; + LBitmapWidth := Round(FWidth * Scale); + LBitmapHeight := Round(FHeight * Scale); + LBitmap.Width := LBitmapWidth; + LBitmap.Height := LBitmapHeight; SVG.SVGOpacity := Opacity; SVG.FixedColor := FixedColor; SVG.Grayscale := GrayScale; - PaintToBitmap(LBitmap, SVG); + PaintToBitmap(LBitmap, SVG, FZoom); end; function TSVGIconBitmapItem.GetBitmap: TBitmapOfItem; @@ -321,6 +360,16 @@ function TSVGIconBitmapItem.GetGrayScale: Boolean; Result := FOwnerMultiResBitmap.FOwnerSourceItem.GrayScale; end; +function TSVGIconBitmapItem.GetSVGColor: TAlphaColor; +begin + Result := FOwnerMultiResBitmap.FOwnerSourceItem.FixedColor; +end; + +function TSVGIconBitmapItem.GetHeight: Integer; +begin + Result := inherited Height; +end; + function TSVGIconBitmapItem.GetOpacity: single; begin Result := FOwnerMultiResBitmap.FOwnerSourceItem.Opacity; @@ -328,7 +377,9 @@ function TSVGIconBitmapItem.GetOpacity: single; function TSVGIconBitmapItem.GetSize: Integer; begin - Result := FSize; + Result := Max(FWidth, FHeight); + if Result = 0 then + Result := DEFAULT_SIZE; end; function TSVGIconBitmapItem.GetSVG: TSVG; @@ -336,9 +387,9 @@ function TSVGIconBitmapItem.GetSVG: TSVG; Result := FOwnerMultiResBitmap.FOwnerSourceItem.SVG; end; -function TSVGIconBitmapItem.GetSVGColor: TColor; +function TSVGIconBitmapItem.GetWidth: Integer; begin - Result := FOwnerMultiResBitmap.FOwnerSourceItem.FixedColor; + Result := inherited Width; end; procedure TSVGIconBitmapItem.SetBitmap(const AValue: TBitmapOfItem); @@ -347,15 +398,66 @@ procedure TSVGIconBitmapItem.SetBitmap(const AValue: TBitmapOfItem); inherited Bitmap.BitmapScale := Scale; end; -procedure TSVGIconBitmapItem.SetSize(const AValue: Integer); +procedure TSVGIconBitmapItem.SetHeight(const AValue: Integer); begin - if (AValue > 0) and (AValue <> FSize) then + if AValue <> FHeight then begin - FSize := AValue; + FHeight := AValue; DrawSVGIcon; end; end; +procedure TSVGIconBitmapItem.SetWidth(const AValue: Integer); +begin + if AValue <> FWidth then + begin + FWidth := AValue; + DrawSVGIcon; + end; +end; + +procedure TSVGIconBitmapItem.SetZoom(const AValue: Integer); +begin + if (FZoom <> AValue) and (AValue <= 100) and (AValue >= 10) then + begin + FZoom := AValue; + DrawSVGIcon; + end; +end; + +procedure TSVGIconBitmapItem.SetIconSize(const AWidth, AHeight, AZoom: Integer); +begin + if (AWidth <> 0) and (AHeight <> 0) and + ((AWidth <> FWidth) or (AHeight <> FHeight) or (AZoom <> FZoom)) then + begin + FWidth := AWidth; + FHeight := AHeight; + FZoom := AZoom; + DrawSVGIcon; + end; +end; + +procedure TSVGIconBitmapItem.SetSize(const AValue: Integer); +begin + if ((AValue <> FHeight) or (AValue <> FWidth)) then + SetIconSize(AValue, AValue, FZoom); +end; + +function TSVGIconBitmapItem.StoreHeight: Boolean; +begin + Result := (Width <> Height) and (Height <> DEFAULT_SIZE); +end; + +function TSVGIconBitmapItem.StoreSize: Boolean; +begin + Result := (Width = Height) and (Width <> DEFAULT_SIZE); +end; + +function TSVGIconBitmapItem.StoreWidth: Boolean; +begin + Result := (Width <> Height) and (Width <> DEFAULT_SIZE); +end; + { TSVGIconMultiResBitmap } constructor TSVGIconMultiResBitmap.Create(AOwner: TPersistent; @@ -368,7 +470,7 @@ constructor TSVGIconMultiResBitmap.Create(AOwner: TPersistent; FOwnerSourceItem := nil; end; -procedure TSVGIconMultiResBitmap.UpdateImageSize(const ASize: Integer); +procedure TSVGIconMultiResBitmap.UpdateImageSize(const AWidth, AHeight, AZoom: Integer); var I, J: Integer; LItem: TSVGIconBitmapItem; @@ -378,9 +480,11 @@ procedure TSVGIconMultiResBitmap.UpdateImageSize(const ASize: Integer); for J := 0 to Count - 1 do begin LItem := Items[J] as TSVGIconBitmapItem; - if LItem.Size <> ASize then + if (LItem.FWidth <> AWidth) or (LItem.FHeight <> AHeight) then begin - LItem.Size := ASize; + LItem.FWidth := AWidth; + LItem.FHeight := AHeight; + LItem.Zoom := AZoom; LItem.DrawSVGIcon; end; end; @@ -401,7 +505,7 @@ procedure TSVGIconSourceItem.Assign(Source: TPersistent); inherited; end; -procedure TSVGIconSourceItem.AutoSizeBitmap(const ASize: Integer); +procedure TSVGIconSourceItem.AutoSizeBitmap(const AWidth, AHeight, AZoom: Integer); begin //If present, delete multiple items while MultiResBitmap.Count > 1 do @@ -409,7 +513,7 @@ procedure TSVGIconSourceItem.AutoSizeBitmap(const ASize: Integer); //Add only one item if MultiResBitmap.Count = 0 then MultiResBitmap.Add; - (MultiResBitmap as TSVGIconMultiResBitmap).UpdateImageSize(ASize); + (MultiResBitmap as TSVGIconMultiResBitmap).UpdateImageSize(AWidth, AHeight, AZoom); end; constructor TSVGIconSourceItem.Create(Collection: TCollection); @@ -439,7 +543,7 @@ function TSVGIconSourceItem.GetDisplayName: string; Result := Format('%d.%s', [Index, Name]) end; -function TSVGIconSourceItem.GetFixedColor: TColor; +function TSVGIconSourceItem.GetFixedColor: TAlphaColor; begin if FFixedColor = SVG_INHERIT_COLOR then Result := FOwnerImageList.FixedColor @@ -487,7 +591,7 @@ function TSVGIconSourceItem.GetDestinationItem: TCustomDestinationItem; end; end; -procedure TSVGIconSourceItem.SetFixedColor(const Value: TColor); +procedure TSVGIconSourceItem.SetFixedColor(const Value: TAlphaColor); begin if FFixedColor <> Value then begin @@ -549,6 +653,14 @@ function TSVGIconSourceItem.StoreOpacity: Boolean; Result := (FOwnerImageList = nil) or (FOpacity <> FOwnerImageList.FOpacity); end; +procedure TSVGIconSourceItem.UpdateIconAttributes(const AFixedColor: TAlphaColor; + const AReplaceFixedColor: Boolean = False); +begin + //If AReplaceFontColor is false then the color of single icon is preserved + if AReplaceFixedColor and (FFixedColor <> TAlphaColors.Null) then + FFixedColor := AFixedColor; +end; + procedure TSVGIconSourceItem.UpdateAllItems; var I: Integer; @@ -561,9 +673,9 @@ procedure TSVGIconSourceItem.UpdateAllItems; Litem.DrawSVGIcon; if (I=0) and (FOwnerImageList <> nil) then begin - LItem.Size := FOwnerImageList.Size; - LSize.cx := LItem.Size; - LSize.cy := LItem.Size; + LItem.SetIconSize(FOwnerImageList.Width, FOwnerImageList.Height, FOwnerImageList.Zoom); + LSize.cx := LItem.Width; + LSize.cy := LItem.Height; FOwnerImageList.UpdateDestination(LSize, Index); end; end; @@ -651,11 +763,13 @@ procedure TSVGIconImageList.Assign(Source: TPersistent); begin if Source is TSVGIconImageList then begin - FSize := TSVGIconImageList(Source).FSize; Opacity := TSVGIconImageList(Source).Opacity; FFixedColor := TSVGIconImageList(Source).FFixedColor; FGrayScale := TSVGIconImageList(Source).FGrayScale; FAutoSizeBitmaps := TSVGIconImageList(Source).FAutoSizeBitmaps; + Zoom := TSVGIconImageList(Source).FZoom; + SetIconSize(TSVGIconImageList(Source).FWidth, + TSVGIconImageList(Source).FHeight); end; inherited; end; @@ -670,10 +784,12 @@ constructor TSVGIconImageList.Create(AOwner: TComponent); begin inherited; FAutoSizeBitmaps := True; - FOpacity := 1; - FSize := 32; FixedColor := SVG_INHERIT_COLOR; FGrayScale := False; + FOpacity := 1; + FWidth := DEFAULT_SIZE; + FHeight := DEFAULT_SIZE; + FZoom := ZOOM_DEFAULT; end; function TSVGIconImageList.CreateSource: TSourceCollection; @@ -681,13 +797,13 @@ function TSVGIconImageList.CreateSource: TSourceCollection; Result := TSourceCollection.Create(self, TSVGIconSourceItem); end; -procedure TSVGIconImageList.UpdateDestination(Size: TSize; +procedure TSVGIconImageList.UpdateDestination(ASize: TSize; const Index: Integer); var LDestItem: TDestinationItem; LSourceItem: TSVGIconSourceItem; LIndex: Integer; - LSize: Integer; + LWidth, LHeight: Integer; begin while Index > Destination.Count-1 do Destination.Add; @@ -702,15 +818,32 @@ procedure TSVGIconImageList.UpdateDestination(Size: TSize; begin if FAutoSizeBitmaps then begin - LSize := Min(Size.cx, Size.cy); - LSourceItem.AutoSizeBitmap(LSize); + if FWidth = FHeight then + begin + LWidth := Min(ASize.cy, ASize.cx); + LHeight := LWidth; + end + else if FWidth > FHeight then + begin + LWidth := Min(ASize.cy, ASize.cx); + LHeight := Round((FHeight / FWidth) * ASize.cy); + end + else + begin + LHeight := ASize.cy; + LWidth := Round((FWidth / FHeight) * ASize.cx); + end; + LSourceItem.AutoSizeBitmap(LWidth, LHeight, FZoom); end else - LSize := LSourceItem.FOwnerImageList.Size; + begin + LWidth := LSourceItem.FOwnerImageList.FWidth; + LHeight := LSourceItem.FOwnerImageList.FHeight; + end; LDestItem.Layers[0].SourceRect.Top := 0; LDestItem.Layers[0].SourceRect.Left := 0; - LDestItem.Layers[0].SourceRect.Right := LSize; - LDestItem.Layers[0].SourceRect.Bottom := LSize; + LDestItem.Layers[0].SourceRect.Right := LWidth; + LDestItem.Layers[0].SourceRect.Bottom := LHeight; end; end; end; @@ -718,18 +851,16 @@ procedure TSVGIconImageList.UpdateDestination(Size: TSize; procedure TSVGIconImageList.UpdateIconAttributes(const ASize: Integer; const AOpacity: Single); -//var -// I: Integer; -// LSVGIconItem: TSVGIconSourceItem; +var + I: Integer; + LSVGIconItem: TSVGIconSourceItem; begin - (* Self.Size := ASize; for I := 0 to Source.Count -1 do begin LSVGIconItem := Source.Items[I] as TSVGIconSourceItem; - LSVGIconItem.UpdateIconAttributes(FOpacity); + LSVGIconItem.UpdateIconAttributes(FixedColor); end; - *) end; procedure TSVGIconImageList.DeleteIcon(const AIndex: Integer); @@ -754,9 +885,34 @@ function TSVGIconImageList.DoBitmap(Size: TSize; Result := inherited DoBitmap(Size, Index); end; +function TSVGIconImageList.StoreSize: Boolean; +begin + Result := (Width = Height) and (Width <> DEFAULT_SIZE); +end; + +function TSVGIconImageList.StoreWidth: Boolean; +begin + Result := (Width <> Height) and (Width <> DEFAULT_SIZE); +end; + +function TSVGIconImageList.StoreHeight: Boolean; +begin + Result := (Width <> Height) and (Height <> DEFAULT_SIZE); +end; + function TSVGIconImageList.GetSize: Integer; begin - Result := FSize; + Result := Max(FWidth, FHeight); +end; + +function TSVGIconImageList.GetWidth: Integer; +begin + Result := FWidth; +end; + +function TSVGIconImageList.GetHeight: Integer; +begin + Result := FHeight; end; procedure TSVGIconImageList.Loaded; @@ -772,7 +928,25 @@ procedure TSVGIconImageList.SetAutoSizeBitmaps(const Value: Boolean); UpdateSourceItems; end; -procedure TSVGIconImageList.SetFixedColor(const Value: TColor); +procedure TSVGIconImageList.UpdateSourceItems; +var + I: Integer; + LSourceItem: TSVGIconSourceItem; +begin + for I := 0 to Source.Count -1 do + begin + LSourceItem := Source[I] as TSVGIconSourceItem; + if LSourceItem.FOpacity = -1 then + LSourceItem.Opacity := FOpacity; + if not LSourceItem.GrayScale then + LSourceItem.GrayScale := FGrayScale; + if LSourceItem.FixedColor = SVG_INHERIT_COLOR then + LSourceItem.FixedColor := FFixedColor; + LSourceItem.UpdateAllItems; + end; +end; + +procedure TSVGIconImageList.SetFixedColor(const Value: TAlphaColor); begin if FFixedColor <> Value then begin @@ -790,21 +964,23 @@ procedure TSVGIconImageList.SetGrayScale(const Value: Boolean); end; end; -procedure TSVGIconImageList.UpdateSourceItems; -var - I: Integer; - LSourceItem: TSVGIconSourceItem; +procedure TSVGIconImageList.SetHeight(const AValue: Integer); begin - for I := 0 to Source.Count -1 do + if FHeight <> AValue then begin - LSourceItem := Source[I] as TSVGIconSourceItem; - if LSourceItem.FOpacity = -1 then - LSourceItem.Opacity := FOpacity; - if not LSourceItem.GrayScale then - LSourceItem.GrayScale := FGrayScale; - if LSourceItem.FixedColor = SVG_INHERIT_COLOR then - LSourceItem.FixedColor := FFixedColor; - LSourceItem.UpdateAllItems; + FHeight := AValue; + UpdateSourceItems; + end; +end; + +procedure TSVGIconImageList.SetIconSize(const AWidth, AHeight: Integer); +begin + if (AWidth <> 0) and (AHeight <> 0) and + ((AWidth <> FWidth) or (AHeight <> FHeight)) then + begin + FWidth := AWidth; + FHeight := AHeight; + UpdateSourceItems; end; end; @@ -817,18 +993,33 @@ procedure TSVGIconImageList.SetOpacity(const Value: single); end; end; -procedure TSVGIconImageList.SetSize(const Value: Integer); +function TSVGIconImageList.StoreOpacity: Boolean; +begin + Result := FOpacity <> 1; +end; + +procedure TSVGIconImageList.SetSize(const AValue: Integer); begin - if FSize <> Value then + if ((AValue <> FHeight) or (AValue <> FWidth)) then + SetIconSize(AValue, AValue); +end; + +procedure TSVGIconImageList.SetWidth(const AValue: Integer); +begin + if FWidth <> AValue then begin - FSize := Value; + FWidth := AValue; UpdateSourceItems; end; end; -function TSVGIconImageList.StoreOpacity: Boolean; +procedure TSVGIconImageList.SetZoom(const AValue: Integer); begin - Result := FOpacity <> 1; + if (FZoom <> AValue) and (AValue <= 100) and (AValue >= 10) then + begin + FZoom := AValue; + UpdateSourceItems; + end; end; initialization