├── .gitattributes ├── .gitignore ├── BaiduMapSDK ├── Androidapi.JNI.baidu.location.pas ├── Androidapi.JNI.baidu.mapapi.bikenavi.pas ├── Androidapi.JNI.baidu.mapapi.cloud.pas ├── Androidapi.JNI.baidu.mapapi.favorite.pas ├── Androidapi.JNI.baidu.mapapi.map.pas ├── Androidapi.JNI.baidu.mapapi.model.pas ├── Androidapi.JNI.baidu.mapapi.navi.pas ├── Androidapi.JNI.baidu.mapapi.pas ├── Androidapi.JNI.baidu.mapapi.radar.pas ├── Androidapi.JNI.baidu.mapapi.search.pas ├── Androidapi.JNI.baidu.mapapi.utils.pas ├── Androidapi.JNI.baidu.navisdk.pas ├── BaiduMapAPI.LocationService.Android.pas ├── BaiduMapAPI.LocationService.iOS.pas ├── BaiduMapAPI.LocationService.pas ├── BaiduMapAPI.NaviService.Android.pas ├── BaiduMapAPI.NaviService.CommTypes.pas ├── BaiduMapAPI.NaviService.iOS.pas ├── BaiduMapAPI.NaviService.pas ├── BaiduMapAPI.PoiSearchService.Android.pas ├── BaiduMapAPI.PoiSearchService.iOS.pas ├── BaiduMapAPI.PoiSearchService.pas ├── BaiduMapAPI.RoutePlanSearchService.Android.pas ├── BaiduMapAPI.RoutePlanSearchService.pas ├── BaiduMapAPI.SDKInitializer.pas ├── BaiduMapAPI.Search.CommTypes.pas ├── BaiduMapAPI.ViewService.Android.pas ├── BaiduMapAPI.ViewService.iOS.pas ├── BaiduMapAPI.ViewService.pas ├── FMX.CallUIThread.Helper.Android.pas ├── README.md ├── iOSapi.AVFoundation.Helper.pas ├── iOSapi.BaiduMapAPI_Base.pas ├── iOSapi.BaiduMapAPI_Location.pas ├── iOSapi.BaiduMapAPI_Map.pas ├── iOSapi.BaiduMapAPI_Navi.pas ├── iOSapi.BaiduMapAPI_Search.pas └── iOSapi.BaiduMapAPI_Utils.pas ├── ComponentsSource ├── AndroidManifest.template.xml ├── CnCalendar.pas ├── DelphiZXIngQRCode.pas ├── FMX.Animation.pas ├── FMX.BezierAnimation.pas ├── FMX.BezierPanel.pas ├── FMX.CalendarControl.pas ├── FMX.CalendarControlEd.pas ├── FMX.CalendarItemAppearance.pas ├── FMX.Callout.pas ├── FMX.CircleScoreIndicator.pas ├── FMX.ComponentsCommon.pas ├── FMX.GesturePassword.pas ├── FMX.Graphics.INativeCanvas.pas ├── FMX.Graphics.NativeCanvas.pas ├── FMX.ImageSlider.pas ├── FMX.LoadingIndicator.pas ├── FMX.QRCode.pas ├── FMX.RainingBarEd.pas ├── FMX.RatingBar.pas ├── FMX.RegComponents.pas ├── FMX.RotatingText.pas ├── FMX.ScrollableList.pas ├── FMX.Seg7Shape.pas ├── FMX.SimpleBBCodeText.pas ├── FMX.Toast.pas ├── FMXComponentEd.dpk ├── FMXComponentEd.dproj ├── FMXComponents.dpk ├── FMXComponents.dproj ├── FMXComponents.inc ├── FMXComponents.res ├── NativeDraw.inc ├── Res │ ├── 1@ │ │ ├── PasswordBackground@1x.png │ │ ├── PasswordCircle@1x.png │ │ └── PasswordPoint@1x.png │ ├── 2@ │ │ ├── PasswordBackground@2x.png │ │ ├── PasswordCircle@2x.png │ │ └── PasswordPoint@2x.png │ └── 3@ │ │ ├── PasswordBackground@3x.png │ │ ├── PasswordCircle@3x.png │ │ └── PasswordPoint@3x.png ├── Seg7ShapeFmx.dcr ├── Seg7ShapeFmxLICENSE └── qcndate.pas ├── Demo ├── AndroidManifest.template.xml ├── CalendarDemo │ ├── .gitignore │ ├── AndroidManifest.template.xml │ ├── CalendarDemo.deployproj │ ├── CalendarDemo.dpr │ ├── CalendarDemo.dproj │ ├── CalendarDemoMain.fmx │ └── CalendarDemoMain.pas ├── Entitlement.TemplateOSX32.xml ├── FMXComponentsDemo.dpr ├── FMXComponentsDemo.dproj ├── FMXComponentsDemo.res ├── FMXComponentsDemoMain.fmx ├── FMXComponentsDemoMain.pas ├── FMXGR32DemoMain.fmx ├── FMXGR32DemoMain.pas ├── FMXGR32DemoProj.dpr ├── FMXGR32DemoProj.dproj ├── ImageSliderDemo │ ├── .gitignore │ ├── AndroidManifest.template.xml │ ├── ImageSliderDemo.deployproj │ ├── ImageSliderDemo.dpr │ ├── ImageSliderDemo.dproj │ ├── Images │ │ ├── Image1.jpg │ │ ├── image2.jpg │ │ ├── image3.jpg │ │ └── image4.jpg │ ├── frmMainU.fmx │ └── frmMainU.pas ├── LoadingIndicatiorDemoMain.fmx ├── LoadingIndicatiorDemoMain.pas ├── LoadingIndicatorDemo.deployproj ├── LoadingIndicatorDemo.dpr ├── LoadingIndicatorDemo.dproj ├── ONE.Objects.pas ├── PhotoCorrect │ ├── PerspectiveCorrect.pas │ ├── PhotoCorrect.dpr │ ├── PhotoCorrect.dproj │ ├── PhotoCorrectDemoMain.fmx │ ├── PhotoCorrectDemoMain.pas │ └── SimpleSVD.pas ├── RatingBarDemo │ ├── .gitignore │ ├── AndroidManifest.template.xml │ ├── RatingBarDemo.deployproj │ ├── RatingBarDemo.dpr │ ├── RatingBarDemo.dproj │ ├── RatingBarDemoMain.fmx │ └── RatingBarDemoMain.pas ├── RotatingTextDemo │ ├── .gitignore │ ├── AndroidManifest.template.xml │ ├── Entitlement.TemplateOSX32.xml │ ├── Entitlement.TemplateiOS.xml │ ├── RotateTextDemoMain.fmx │ ├── RotateTextDemoMain.pas │ ├── RotateTextDemoProj.deployproj │ ├── RotateTextDemoProj.dpr │ ├── RotateTextDemoProj.dproj │ ├── info.plist.TemplateOSX.xml │ └── info.plist.TemplateiOS.xml ├── TestBezierAnimation │ ├── .gitignore │ ├── AndroidManifest.template.xml │ ├── TestBezierAnimation.deployproj │ ├── TestBezierAnimation.dpr │ ├── TestBezierAnimation.dproj │ ├── TestBezierAnimationMain.fmx │ └── TestBezierAnimationMain.pas ├── TestCallout │ ├── .gitignore │ ├── AndroidManifest.template.xml │ ├── Entitlement.TemplateOSX32.xml │ ├── TestFMXCallout.deployproj │ ├── TestFMXCallout.dpr │ ├── TestFMXCallout.dproj │ ├── TestFMXCalloutMain.fmx │ ├── TestFMXCalloutMain.pas │ └── info.plist.TemplateOSX.xml ├── TestINativeCanvas │ ├── AndroidManifest.template.xml │ ├── Entitlement.TemplateOSX32.xml │ ├── Entitlement.TemplateiOS.xml │ ├── TestINativeCanvas.deployproj │ ├── TestINativeCanvas.dpr │ ├── TestINativeCanvas.dproj │ ├── TestINativeCanvasMain.fmx │ ├── TestINativeCanvasMain.pas │ ├── info.plist.TemplateOSX.xml │ └── info.plist.TemplateiOS.xml ├── TestLoadingIndicator │ ├── .gitignore │ ├── LoadingIndicatorDemoMain.fmx │ ├── LoadingIndicatorDemoMain.pas │ ├── TestLoadingIndicator.dpr │ └── TestLoadingIndicator.dproj └── info.plist.TemplateOSX.xml ├── Documents ├── BaiduMapSDK.md ├── FMXBezierAnimation.md ├── FMXCalendarControl.md ├── FMXCallout.md ├── FMXCircleScoreIndicator.md ├── FMXGR32.md ├── FMXGR32Demo.md ├── FMXGesturePassword.md ├── FMXImageSlider.md ├── FMXLoadingIndicator.md ├── FMXQRCode.md ├── FMXRatingBar.md ├── FMXRotatingText.md ├── FMXScrollableList.md ├── FMXSeg7Shape.md ├── FMXSimpleBBCodeText.md ├── FMXToast.md ├── INativeCanvas.md └── PhotoCorrect.md ├── FMXComponentsGroup.groupproj ├── HISTORY.md ├── LICENSE ├── README.md └── SnapShots ├── FMXBezierAnimation.gif ├── FMXCalendarControl.gif ├── FMXCallout.gif ├── FMXCircleScoreIndicator.gif ├── FMXGR32Demo.gif ├── FMXGR32Demo2.gif ├── FMXGuesturePassword.gif ├── FMXImageSlider.gif ├── FMXLoadingIndicator.gif ├── FMXQRCode.gif ├── FMXRatingBar.gif ├── FMXRatingBarED.gif ├── FMXRotatingText.gif ├── FMXScrollableList.gif ├── FMXSeg7Shape.gif ├── FMXSimpleBBCodeText.gif ├── FMXSimpleBBCodeText.png ├── FMXToast.gif ├── FiremonkeyCanvas.png ├── INativeCanvas.png ├── group_qrcode.jpg ├── iOSFMXCanvas.png └── iOSNativeCanvas.png /.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto 2 | *.pas linguist-language=pascal 3 | 4 | 5 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.identcache 2 | *.stat 3 | *.local 4 | /ComponentsSource/__history 5 | /Demo/ScrollYearsDemo.dproj.local 6 | /Demo/__history 7 | /Demo/Win32/Debug 8 | /ComponentsSource/FMXComponents.dproj.local 9 | /FMXComponentsGroup.groupproj.local 10 | /FMXComponentsGroup_prjgroup.tvsconfig 11 | /ComponentsSource/Win32/Debug 12 | /Demo/ScrollYearsDemo.stat 13 | /Demo/FMXComponentsDemo.dproj.local 14 | /ComponentsSource/FMXComponents.stat 15 | /Demo/FMXComponentsDemoMain.vlb 16 | /Demo/Android/Debug 17 | /Demo/FMXComponentsDemo.deployproj 18 | /Demo/FMXComponentsDemo.stat 19 | /Demo/Win32/Release 20 | /ComponentsSource/FMXComponentEd.res 21 | /Demo/LoadingIndicatorDemo.res 22 | /Demo/OSX32/Debug 23 | /Demo/FMXGR32DemoProj.res 24 | /ComponentsSource/Android/Debug 25 | /Demo/TestINativeCanvas/Android/Debug 26 | /Demo/TestINativeCanvas/__history 27 | /Demo/TestINativeCanvas/Win32/Debug 28 | /Demo/TestINativeCanvas/TestINativeCanvas.res 29 | /Demo/TestCallout/TestFMXCallout.stat 30 | /Demo/TestCallout/TestFMXCallout.identcache 31 | /Demo/RotatingTextDemo/OSX32/Debug 32 | /Demo/RotatingTextDemo/iOSSimulator/Debug 33 | /Demo/TestCallout/OSX32/Debug 34 | /Demo/TestINativeCanvas/OSX32/Debug 35 | /Demo/TestINativeCanvas/iOSSimulator/Debug 36 | /Demo/TestBezierAnimation/__history 37 | /Demo/TestBezierAnimation/Win32/Debug 38 | /Demo/TestBezierAnimation/Android/Debug 39 | /Demo/TestINativeCanvas/iOSDevice64/Debug 40 | /Demo/PhotoCorrect/Win32/Debug 41 | /Demo/PhotoCorrect/__history 42 | /Demo/PhotoCorrect/PhotoCorrect.res 43 | /Demo/TestBezierAnimation/TestBezierAnimation.res 44 | /__history 45 | /Demo/__recovery 46 | -------------------------------------------------------------------------------- /BaiduMapSDK/Androidapi.JNI.baidu.mapapi.favorite.pas: -------------------------------------------------------------------------------- 1 | unit Androidapi.JNI.baidu.mapapi.favorite; 2 | // ==================================================== 3 | // Android Baidu Map SDK interface 4 | // Package:com.baidu.mapapi.favorite 5 | // author:Xubzhlin 6 | // email:371889755@qq.com 7 | // 8 | // date:2017.5.10 9 | // version:4.3.0 10 | // ==================================================== 11 | 12 | interface 13 | 14 | uses 15 | Androidapi.JNIBridge, 16 | Androidapi.JNI.JavaTypes, 17 | Androidapi.JNI.baidu.mapapi.model; 18 | 19 | type 20 | // ===== Forward declarations ===== 21 | JFavoriteManager = interface; // com.baidu.mapapi.favorite.FavoriteManager 22 | JFavoritePoiInfo = interface; // com.baidu.mapapi.favorite.FavoritePoiInfo 23 | 24 | // ===== Interface declarations ===== 25 | JFavoriteManagerClass = interface(JObjectClass) 26 | ['{F4E7101B-0F28-416D-B7DC-259CE44487BD}'] 27 | { static Property Methods } 28 | 29 | { static Methods } 30 | { class } function getInstance: JFavoriteManager; cdecl; 31 | // ()Lcom/baidu/mapapi/favorite/FavoriteManager; 32 | 33 | { static Property } 34 | end; 35 | 36 | [JavaSignature('com/baidu/mapapi/favorite/FavoriteManager')] 37 | JFavoriteManager = interface(JObject) 38 | ['{FF031617-2698-4B1A-8199-3CAE6A6A6BFF}'] 39 | { Property Methods } 40 | 41 | { methods } 42 | procedure init; cdecl; // ()V 43 | function add(P1: JFavoritePoiInfo): Integer; cdecl; 44 | // (Lcom/baidu/mapapi/favorite/FavoritePoiInfo;)I 45 | function getFavPoi(P1: JString): JFavoritePoiInfo; cdecl; 46 | // (Ljava/lang/String;)Lcom/baidu/mapapi/favorite/FavoritePoiInfo; 47 | function getAllFavPois: JList; cdecl; // ()Ljava/util/List; 48 | function deleteFavPoi(P1: JString): Boolean; cdecl; // (Ljava/lang/String;)Z 49 | function clearAllFavPois: Boolean; cdecl; // ()Z 50 | function updateFavPoi(P1: JString; P2: JFavoritePoiInfo): Boolean; cdecl; 51 | // (Ljava/lang/String;Lcom/baidu/mapapi/favorite/FavoritePoiInfo;)Z 52 | procedure destroy; cdecl; // ()V 53 | 54 | { Property } 55 | end; 56 | 57 | TJFavoriteManager = class(TJavaGenericImport) 59 | end; 60 | 61 | JFavoritePoiInfoClass = interface(JObjectClass) 62 | ['{07DB3A81-B473-46FB-BE9D-199D5BA45F96}'] 63 | { static Property Methods } 64 | 65 | { static Methods } 66 | { class } function init: JFavoritePoiInfo; cdecl; // ()V 67 | 68 | { static Property } 69 | end; 70 | 71 | [JavaSignature('com/baidu/mapapi/favorite/FavoritePoiInfo')] 72 | JFavoritePoiInfo = interface(JObject) 73 | ['{08D2C683-9F70-4552-84FE-F3B641D3230C}'] 74 | { Property Methods } 75 | 76 | { methods } 77 | function poiName(P1: JString): JFavoritePoiInfo; cdecl; 78 | // (Ljava/lang/String;)Lcom/baidu/mapapi/favorite/FavoritePoiInfo; 79 | function pt(P1: JLatLng): JFavoritePoiInfo; cdecl; 80 | // (Lcom/baidu/mapapi/model/LatLng;)Lcom/baidu/mapapi/favorite/FavoritePoiInfo; 81 | function addr(P1: JString): JFavoritePoiInfo; cdecl; 82 | // (Ljava/lang/String;)Lcom/baidu/mapapi/favorite/FavoritePoiInfo; 83 | function cityName(P1: JString): JFavoritePoiInfo; cdecl; 84 | // (Ljava/lang/String;)Lcom/baidu/mapapi/favorite/FavoritePoiInfo; 85 | function uid(P1: JString): JFavoritePoiInfo; cdecl; 86 | // (Ljava/lang/String;)Lcom/baidu/mapapi/favorite/FavoritePoiInfo; 87 | function getID: JString; cdecl; // ()Ljava/lang/String; 88 | function getPoiName: JString; cdecl; // ()Ljava/lang/String; 89 | function getPt: JLatLng; cdecl; // ()Lcom/baidu/mapapi/model/LatLng; 90 | function getAddr: JString; cdecl; // ()Ljava/lang/String; 91 | function getUid: JString; cdecl; // ()Ljava/lang/String; 92 | function getCityName: JString; cdecl; // ()Ljava/lang/String; 93 | function getTimeStamp: Int64; cdecl; // ()J 94 | 95 | { Property } 96 | end; 97 | 98 | TJFavoritePoiInfo = class(TJavaGenericImport) 100 | end; 101 | 102 | implementation 103 | 104 | procedure RegisterTypes; 105 | begin 106 | TRegTypes.RegisterType('Androidapi.JNI.baidu.mapapi.favorite.FavoriteManager', 107 | TypeInfo(Androidapi.JNI.baidu.mapapi.favorite.JFavoriteManager)); 108 | TRegTypes.RegisterType('Androidapi.JNI.baidu.mapapi.favorite.FavoritePoiInfo', 109 | TypeInfo(Androidapi.JNI.baidu.mapapi.favorite.JFavoritePoiInfo)); 110 | end; 111 | 112 | initialization 113 | 114 | RegisterTypes; 115 | 116 | end. 117 | -------------------------------------------------------------------------------- /BaiduMapSDK/Androidapi.JNI.baidu.mapapi.navi.pas: -------------------------------------------------------------------------------- 1 | unit Androidapi.JNI.baidu.mapapi.navi; 2 | // ==================================================== 3 | // Android Baidu Map SDK interface 4 | // Package:com.baidu.mapapi.navi 5 | // author:Xubzhlin 6 | // email:371889755@qq.com 7 | // 8 | // date:2017.5.10 9 | // version:4.3.0 10 | // ==================================================== 11 | 12 | interface 13 | 14 | uses 15 | Androidapi.JNIBridge, 16 | Androidapi.JNI.GraphicsContentViewText, 17 | Androidapi.JNI.JavaTypes, 18 | Androidapi.JNI.baidu.mapapi.model; 19 | 20 | type 21 | // ===== Forward declarations ===== 22 | JBaiduMapAppNotSupportNaviException = interface; 23 | // com.baidu.mapapi.navi.BaiduMapAppNotSupportNaviException 24 | JBaiduMapNavigation = interface; // com.baidu.mapapi.navi.BaiduMapNavigation 25 | JIllegalNaviArgumentException = interface; 26 | // com.baidu.mapapi.navi.IllegalNaviArgumentException 27 | JNaviParaOption = interface; // com.baidu.mapapi.navi.NaviParaOption 28 | 29 | // ===== Interface declarations ===== 30 | 31 | JBaiduMapAppNotSupportNaviExceptionClass = interface(JRuntimeExceptionClass) 32 | // or JObjectClass // SuperSignature: java/lang/RuntimeException 33 | ['{4D4B436F-5E09-4151-B03B-89C622775139}'] 34 | { static Property Methods } 35 | 36 | { static Methods } 37 | { class } function init: JBaiduMapAppNotSupportNaviException; cdecl; 38 | overload; // ()V 39 | { class } function init(P1: JString): JBaiduMapAppNotSupportNaviException; 40 | cdecl; overload; // (Ljava/lang/String;)V 41 | 42 | { static Property } 43 | end; 44 | 45 | [JavaSignature('com/baidu/mapapi/navi/BaiduMapAppNotSupportNaviException')] 46 | JBaiduMapAppNotSupportNaviException = interface(JRuntimeException) 47 | // or JObject // SuperSignature: java/lang/RuntimeException 48 | ['{2BB8FA48-D2E4-4F0E-B948-86399AC77919}'] 49 | { Property Methods } 50 | 51 | { methods } 52 | 53 | { Property } 54 | end; 55 | 56 | TJBaiduMapAppNotSupportNaviException = class 57 | (TJavaGenericImport) 59 | end; 60 | 61 | JBaiduMapNavigationClass = interface(JObjectClass) 62 | ['{FDBC02D1-448F-4BE2-86B0-1BDD0DE3735F}'] 63 | { static Property Methods } 64 | 65 | { static Methods } 66 | { class } function init: JBaiduMapNavigation; cdecl; // ()V 67 | { class } procedure setSupportWebNavi(P1: Boolean); cdecl; // (Z)V 68 | { class } function openBaiduMapNavi(P1: JNaviParaOption; P2: JContext) 69 | : Boolean; cdecl; 70 | // (Lcom/baidu/mapapi/navi/NaviParaOption;Landroid/content/Context;)Z 71 | { class } function openBaiduMapWalkNavi(P1: JNaviParaOption; P2: JContext) 72 | : Boolean; cdecl; 73 | // (Lcom/baidu/mapapi/navi/NaviParaOption;Landroid/content/Context;)Z 74 | { class } function openBaiduMapWalkNaviAR(P1: JNaviParaOption; P2: JContext) 75 | : Boolean; cdecl; 76 | // (Lcom/baidu/mapapi/navi/NaviParaOption;Landroid/content/Context;)Z 77 | { class } function openBaiduMapBikeNavi(P1: JNaviParaOption; P2: JContext) 78 | : Boolean; cdecl; 79 | // (Lcom/baidu/mapapi/navi/NaviParaOption;Landroid/content/Context;)Z 80 | { class } procedure openWebBaiduMapNavi(P1: JNaviParaOption; P2: JContext); 81 | cdecl; // Deprecated //(Lcom/baidu/mapapi/navi/NaviParaOption;Landroid/content/Context;)V 82 | { class } procedure finish(P1: JContext); cdecl; 83 | // (Landroid/content/Context;)V 84 | 85 | { static Property } 86 | end; 87 | 88 | [JavaSignature('com/baidu/mapapi/navi/BaiduMapNavigation')] 89 | JBaiduMapNavigation = interface(JObject) 90 | ['{7DED77E8-455E-41E3-9EE7-BD95723E5AD0}'] 91 | { Property Methods } 92 | 93 | { methods } 94 | 95 | { Property } 96 | end; 97 | 98 | TJBaiduMapNavigation = class(TJavaGenericImport) 100 | end; 101 | 102 | JIllegalNaviArgumentExceptionClass = interface(JRuntimeExceptionClass) 103 | // or JObjectClass // SuperSignature: java/lang/RuntimeException 104 | ['{371253B2-DC86-4614-8DDA-06239709DC87}'] 105 | { static Property Methods } 106 | 107 | { static Methods } 108 | { class } function init: JIllegalNaviArgumentException; cdecl; overload; 109 | // ()V 110 | { class } function init(P1: JString): JIllegalNaviArgumentException; cdecl; 111 | overload; // (Ljava/lang/String;)V 112 | 113 | { static Property } 114 | end; 115 | 116 | [JavaSignature('com/baidu/mapapi/navi/IllegalNaviArgumentException')] 117 | JIllegalNaviArgumentException = interface(JRuntimeException) 118 | // or JObject // SuperSignature: java/lang/RuntimeException 119 | ['{ACCF4A5B-29CA-4506-9CCC-8E50F1A272E2}'] 120 | { Property Methods } 121 | 122 | { methods } 123 | 124 | { Property } 125 | end; 126 | 127 | TJIllegalNaviArgumentException = class 128 | (TJavaGenericImport) 130 | end; 131 | 132 | JNaviParaOptionClass = interface(JObjectClass) 133 | ['{A331635B-7074-4F26-A25B-6C84F3FACAA1}'] 134 | { static Property Methods } 135 | 136 | { static Methods } 137 | { class } function init: JNaviParaOption; cdecl; // ()V 138 | 139 | { static Property } 140 | end; 141 | 142 | [JavaSignature('com/baidu/mapapi/navi/NaviParaOption')] 143 | JNaviParaOption = interface(JObject) 144 | ['{AAD88A83-FDF1-484A-8BA1-599235650ECC}'] 145 | { Property Methods } 146 | 147 | { methods } 148 | function startPoint(P1: JLatLng): JNaviParaOption; cdecl; 149 | // (Lcom/baidu/mapapi/model/LatLng;)Lcom/baidu/mapapi/navi/NaviParaOption; 150 | function startName(P1: JString): JNaviParaOption; cdecl; 151 | // (Ljava/lang/String;)Lcom/baidu/mapapi/navi/NaviParaOption; 152 | function endPoint(P1: JLatLng): JNaviParaOption; cdecl; 153 | // (Lcom/baidu/mapapi/model/LatLng;)Lcom/baidu/mapapi/navi/NaviParaOption; 154 | function endName(P1: JString): JNaviParaOption; cdecl; 155 | // (Ljava/lang/String;)Lcom/baidu/mapapi/navi/NaviParaOption; 156 | function getStartPoint: JLatLng; cdecl; // ()Lcom/baidu/mapapi/model/LatLng; 157 | function getEndPoint: JLatLng; cdecl; // ()Lcom/baidu/mapapi/model/LatLng; 158 | function getStartName: JString; cdecl; // ()Ljava/lang/String; 159 | function getEndName: JString; cdecl; // ()Ljava/lang/String; 160 | 161 | { Property } 162 | end; 163 | 164 | TJNaviParaOption = class(TJavaGenericImport) 166 | end; 167 | 168 | implementation 169 | 170 | procedure RegisterTypes; 171 | begin 172 | TRegTypes.RegisterType 173 | ('Androidapi.JNI.baidu.mapapi.navi.BaiduMapAppNotSupportNaviException', 174 | TypeInfo(Androidapi.JNI.baidu.mapapi.navi. 175 | JBaiduMapAppNotSupportNaviException)); 176 | TRegTypes.RegisterType('Androidapi.JNI.baidu.mapapi.navi.BaiduMapNavigation', 177 | TypeInfo(Androidapi.JNI.baidu.mapapi.navi.JBaiduMapNavigation)); 178 | TRegTypes.RegisterType 179 | ('Androidapi.JNI.baidu.mapapi.navi.IllegalNaviArgumentException', 180 | TypeInfo(Androidapi.JNI.baidu.mapapi.navi.JIllegalNaviArgumentException)); 181 | TRegTypes.RegisterType('Androidapi.JNI.baidu.mapapi.navi.NaviParaOption', 182 | TypeInfo(Androidapi.JNI.baidu.mapapi.navi.JNaviParaOption)); 183 | end; 184 | 185 | initialization 186 | 187 | RegisterTypes; 188 | 189 | end. 190 | -------------------------------------------------------------------------------- /BaiduMapSDK/Androidapi.JNI.baidu.mapapi.pas: -------------------------------------------------------------------------------- 1 | unit Androidapi.JNI.baidu.mapapi; 2 | // ==================================================== 3 | // Android Baidu Map SDK interface 4 | // package:com.baidu.map 5 | // author:Xubzhlin 6 | // email:371889755@qq.com 7 | // 8 | // date:2017.5.10 9 | // version:4.3.0 10 | // ==================================================== 11 | 12 | interface 13 | 14 | uses 15 | Androidapi.JNIBridge, 16 | Androidapi.JNI.GraphicsContentViewText, 17 | Androidapi.JNI.JavaTypes; 18 | 19 | type 20 | // ===== Forward declarations ===== 21 | JModuleName = interface; // com.baidu.mapapi.ModuleName 22 | JCoordType = interface; // com.baidu.mapapi.CoordType 23 | JOpenLogUtil = interface; // com.baidu.mapapi.OpenLogUtil 24 | JSDKInitializer = interface; // com.baidu.mapapi.SDKInitializer 25 | JVersionInfo = interface; // com.baidu.mapapi.VersionInfo 26 | 27 | // ===== Interface declarations ===== 28 | JModuleNameClass = interface(JEnumClass) 29 | // or JObjectClass // SuperSignature: java/lang/Enum 30 | ['{5A2265E6-B6DE-42CA-8AFE-47412DC4349D}'] 31 | { static Property Methods } 32 | { class } function _GetTILE_OVERLAY_MODULE: JModuleName; 33 | // Lcom/baidu/mapapi/ModuleName; 34 | 35 | { static Methods } 36 | { class } function values: TJavaObjectArray; cdecl; 37 | // ()[Lcom/baidu/mapapi/ModuleName; 38 | { class } function valueOf(P1: JString): JModuleName; cdecl; 39 | // (Ljava/lang/String;)Lcom/baidu/mapapi/ModuleName; 40 | 41 | { static Property } 42 | { class } property TILE_OVERLAY_MODULE: JModuleName 43 | read _GetTILE_OVERLAY_MODULE; 44 | end; 45 | 46 | [JavaSignature('com/baidu/mapapi/ModuleName')] 47 | JModuleName = interface(JEnum) // or JObject // SuperSignature: java/lang/Enum 48 | ['{BD0F990B-9259-48A5-A32E-2261F11EBC6D}'] 49 | { Property Methods } 50 | 51 | { methods } 52 | 53 | { Property } 54 | end; 55 | 56 | TJModuleName = class(TJavaGenericImport) 57 | end; 58 | 59 | JCoordTypeClass = interface(JEnumClass) 60 | // or JObjectClass // SuperSignature: java/lang/Enum 61 | ['{86BFBB2A-F389-4A52-B20F-080E02FB81CA}'] 62 | { static Property Methods } 63 | { class } function _GetGCJ02: JCoordType; // Lcom/baidu/mapapi/CoordType; 64 | { class } function _GetBD09LL: JCoordType; // Lcom/baidu/mapapi/CoordType; 65 | 66 | { static Methods } 67 | { class } function values: TJavaObjectArray; cdecl; 68 | // ()[Lcom/baidu/mapapi/CoordType; 69 | { class } function valueOf(P1: JString): JCoordType; cdecl; 70 | // (Ljava/lang/String;)Lcom/baidu/mapapi/CoordType; 71 | 72 | { static Property } 73 | { class } property GCJ02: JCoordType read _GetGCJ02; 74 | { class } property BD09LL: JCoordType read _GetBD09LL; 75 | end; 76 | 77 | [JavaSignature('com/baidu/mapapi/CoordType')] 78 | JCoordType = interface(JEnum) // or JObject // SuperSignature: java/lang/Enum 79 | ['{E5150E18-2A84-4DC2-B27A-5D61CC468C05}'] 80 | { Property Methods } 81 | 82 | { methods } 83 | 84 | { Property } 85 | end; 86 | 87 | TJCoordType = class(TJavaGenericImport) 88 | end; 89 | 90 | JOpenLogUtilClass = interface(JObjectClass) 91 | ['{DF528496-713C-439F-A144-31796C17EE8E}'] 92 | { static Property Methods } 93 | 94 | { static Methods } 95 | { class } function init: JOpenLogUtil; cdecl; // ()V 96 | { class } procedure setModuleLogEnable(P1: JModuleName; P2: Boolean); cdecl; 97 | // (Lcom/baidu/mapapi/ModuleName;Z)V 98 | 99 | { static Property } 100 | end; 101 | 102 | [JavaSignature('com/baidu/mapapi/OpenLogUtil')] 103 | JOpenLogUtil = interface(JObject) 104 | ['{10EB569C-CE7E-4C32-970D-558F359268AF}'] 105 | { Property Methods } 106 | 107 | { methods } 108 | 109 | { Property } 110 | end; 111 | 112 | TJOpenLogUtil = class(TJavaGenericImport) 113 | end; 114 | 115 | JSDKInitializerClass = interface(JObjectClass) 116 | ['{DFDA0430-82FB-479C-A3C9-D0C41599A584}'] 117 | { static Property Methods } 118 | { class } function _GetSDK_BROADTCAST_ACTION_STRING_PERMISSION_CHECK_OK 119 | : JString; // Ljava/lang/String; 120 | { class } function _GetSDK_BROADTCAST_ACTION_STRING_PERMISSION_CHECK_ERROR 121 | : JString; // Ljava/lang/String; 122 | { class } function _GetSDK_BROADCAST_ACTION_STRING_NETWORK_ERROR: JString; 123 | // Ljava/lang/String; 124 | { class } function _GetSDK_BROADTCAST_INTENT_EXTRA_INFO_KEY_ERROR_CODE 125 | : JString; // Ljava/lang/String; 126 | 127 | { static Methods } 128 | { class } procedure initialize(P1: JString; P2: JContext); cdecl; overload; 129 | // (Ljava/lang/String;Landroid/content/Context;)V 130 | { class } procedure initialize(P1: JContext); cdecl; overload; 131 | // (Landroid/content/Context;)V 132 | { class } procedure setCoordType(P1: JCoordType); cdecl; 133 | // (Lcom/baidu/mapapi/CoordType;)V 134 | { class } function getCoordType: JCoordType; cdecl; 135 | // ()Lcom/baidu/mapapi/CoordType; 136 | 137 | { static Property } 138 | { class } property SDK_BROADTCAST_ACTION_STRING_PERMISSION_CHECK_OK: JString 139 | read _GetSDK_BROADTCAST_ACTION_STRING_PERMISSION_CHECK_OK; 140 | { class } property SDK_BROADTCAST_ACTION_STRING_PERMISSION_CHECK_ERROR 141 | : JString read _GetSDK_BROADTCAST_ACTION_STRING_PERMISSION_CHECK_ERROR; 142 | { class } property SDK_BROADCAST_ACTION_STRING_NETWORK_ERROR: JString 143 | read _GetSDK_BROADCAST_ACTION_STRING_NETWORK_ERROR; 144 | { class } property SDK_BROADTCAST_INTENT_EXTRA_INFO_KEY_ERROR_CODE: JString 145 | read _GetSDK_BROADTCAST_INTENT_EXTRA_INFO_KEY_ERROR_CODE; 146 | end; 147 | 148 | [JavaSignature('com/baidu/mapapi/SDKInitializer')] 149 | JSDKInitializer = interface(JObject) 150 | ['{923EE9EC-8263-4B37-BA23-A133CD5AD160}'] 151 | { Property Methods } 152 | 153 | { methods } 154 | 155 | { Property } 156 | end; 157 | 158 | TJSDKInitializer = class(TJavaGenericImport) 160 | end; 161 | 162 | JVersionInfoClass = interface(JObjectClass) 163 | ['{B972F96C-B230-481E-BFD2-EE44BF51764B}'] 164 | { static Property Methods } 165 | { class } function _GetVERSION_DESC: JString; // Ljava/lang/String; 166 | { class } function _GetKIT_NAME: JString; // Ljava/lang/String; 167 | 168 | { static Methods } 169 | { class } function init: JVersionInfo; cdecl; // ()V 170 | { class } function getApiVersion: JString; cdecl; // ()Ljava/lang/String; 171 | { class } function getVersionDesc: JString; cdecl; // ()Ljava/lang/String; 172 | { class } function getKitName: JString; cdecl; // ()Ljava/lang/String; 173 | 174 | { static Property } 175 | { class } property VERSION_DESC: JString read _GetVERSION_DESC; 176 | { class } property KIT_NAME: JString read _GetKIT_NAME; 177 | end; 178 | 179 | [JavaSignature('com/baidu/mapapi/VersionInfo')] 180 | JVersionInfo = interface(JObject) 181 | ['{F6A60A24-D42D-4924-9F1A-483F0DA9BBAE}'] 182 | { Property Methods } 183 | 184 | { methods } 185 | 186 | { Property } 187 | end; 188 | 189 | TJVersionInfo = class(TJavaGenericImport) 190 | end; 191 | 192 | implementation 193 | 194 | procedure RegisterTypes; 195 | begin 196 | TRegTypes.RegisterType('Androidapi.JNI.baidu.mapapi.ModuleName', 197 | TypeInfo(Androidapi.JNI.baidu.mapapi.JModuleName)); 198 | TRegTypes.RegisterType('Androidapi.JNI.baidu.mapapi.CoordType', 199 | TypeInfo(Androidapi.JNI.baidu.mapapi.JCoordType)); 200 | TRegTypes.RegisterType('Androidapi.JNI.baidu.mapapi.OpenLogUtil', 201 | TypeInfo(Androidapi.JNI.baidu.mapapi.JOpenLogUtil)); 202 | TRegTypes.RegisterType('Androidapi.JNI.baidu.mapapi.SDKInitializer', 203 | TypeInfo(Androidapi.JNI.baidu.mapapi.JSDKInitializer)); 204 | TRegTypes.RegisterType('Androidapi.JNI.baidu.mapapi.VersionInfo', 205 | TypeInfo(Androidapi.JNI.baidu.mapapi.JVersionInfo)); 206 | end; 207 | 208 | initialization 209 | 210 | RegisterTypes; 211 | 212 | end. 213 | -------------------------------------------------------------------------------- /BaiduMapSDK/BaiduMapAPI.LocationService.Android.pas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhaoyipeng/FMXComponents/f7d75d6776040f68c840c1724ce694bcf911979d/BaiduMapSDK/BaiduMapAPI.LocationService.Android.pas -------------------------------------------------------------------------------- /BaiduMapSDK/BaiduMapAPI.LocationService.iOS.pas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhaoyipeng/FMXComponents/f7d75d6776040f68c840c1724ce694bcf911979d/BaiduMapSDK/BaiduMapAPI.LocationService.iOS.pas -------------------------------------------------------------------------------- /BaiduMapSDK/BaiduMapAPI.LocationService.pas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhaoyipeng/FMXComponents/f7d75d6776040f68c840c1724ce694bcf911979d/BaiduMapSDK/BaiduMapAPI.LocationService.pas -------------------------------------------------------------------------------- /BaiduMapSDK/BaiduMapAPI.NaviService.Android.pas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhaoyipeng/FMXComponents/f7d75d6776040f68c840c1724ce694bcf911979d/BaiduMapSDK/BaiduMapAPI.NaviService.Android.pas -------------------------------------------------------------------------------- /BaiduMapSDK/BaiduMapAPI.NaviService.CommTypes.pas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhaoyipeng/FMXComponents/f7d75d6776040f68c840c1724ce694bcf911979d/BaiduMapSDK/BaiduMapAPI.NaviService.CommTypes.pas -------------------------------------------------------------------------------- /BaiduMapSDK/BaiduMapAPI.NaviService.iOS.pas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhaoyipeng/FMXComponents/f7d75d6776040f68c840c1724ce694bcf911979d/BaiduMapSDK/BaiduMapAPI.NaviService.iOS.pas -------------------------------------------------------------------------------- /BaiduMapSDK/BaiduMapAPI.NaviService.pas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhaoyipeng/FMXComponents/f7d75d6776040f68c840c1724ce694bcf911979d/BaiduMapSDK/BaiduMapAPI.NaviService.pas -------------------------------------------------------------------------------- /BaiduMapSDK/BaiduMapAPI.PoiSearchService.Android.pas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhaoyipeng/FMXComponents/f7d75d6776040f68c840c1724ce694bcf911979d/BaiduMapSDK/BaiduMapAPI.PoiSearchService.Android.pas -------------------------------------------------------------------------------- /BaiduMapSDK/BaiduMapAPI.PoiSearchService.iOS.pas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhaoyipeng/FMXComponents/f7d75d6776040f68c840c1724ce694bcf911979d/BaiduMapSDK/BaiduMapAPI.PoiSearchService.iOS.pas -------------------------------------------------------------------------------- /BaiduMapSDK/BaiduMapAPI.PoiSearchService.pas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhaoyipeng/FMXComponents/f7d75d6776040f68c840c1724ce694bcf911979d/BaiduMapSDK/BaiduMapAPI.PoiSearchService.pas -------------------------------------------------------------------------------- /BaiduMapSDK/BaiduMapAPI.RoutePlanSearchService.Android.pas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhaoyipeng/FMXComponents/f7d75d6776040f68c840c1724ce694bcf911979d/BaiduMapSDK/BaiduMapAPI.RoutePlanSearchService.Android.pas -------------------------------------------------------------------------------- /BaiduMapSDK/BaiduMapAPI.RoutePlanSearchService.pas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhaoyipeng/FMXComponents/f7d75d6776040f68c840c1724ce694bcf911979d/BaiduMapSDK/BaiduMapAPI.RoutePlanSearchService.pas -------------------------------------------------------------------------------- /BaiduMapSDK/BaiduMapAPI.SDKInitializer.pas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhaoyipeng/FMXComponents/f7d75d6776040f68c840c1724ce694bcf911979d/BaiduMapSDK/BaiduMapAPI.SDKInitializer.pas -------------------------------------------------------------------------------- /BaiduMapSDK/BaiduMapAPI.Search.CommTypes.pas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhaoyipeng/FMXComponents/f7d75d6776040f68c840c1724ce694bcf911979d/BaiduMapSDK/BaiduMapAPI.Search.CommTypes.pas -------------------------------------------------------------------------------- /BaiduMapSDK/BaiduMapAPI.ViewService.Android.pas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhaoyipeng/FMXComponents/f7d75d6776040f68c840c1724ce694bcf911979d/BaiduMapSDK/BaiduMapAPI.ViewService.Android.pas -------------------------------------------------------------------------------- /BaiduMapSDK/BaiduMapAPI.ViewService.iOS.pas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhaoyipeng/FMXComponents/f7d75d6776040f68c840c1724ce694bcf911979d/BaiduMapSDK/BaiduMapAPI.ViewService.iOS.pas -------------------------------------------------------------------------------- /BaiduMapSDK/BaiduMapAPI.ViewService.pas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhaoyipeng/FMXComponents/f7d75d6776040f68c840c1724ce694bcf911979d/BaiduMapSDK/BaiduMapAPI.ViewService.pas -------------------------------------------------------------------------------- /BaiduMapSDK/FMX.CallUIThread.Helper.Android.pas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhaoyipeng/FMXComponents/f7d75d6776040f68c840c1724ce694bcf911979d/BaiduMapSDK/FMX.CallUIThread.Helper.Android.pas -------------------------------------------------------------------------------- /BaiduMapSDK/README.md: -------------------------------------------------------------------------------- 1 | # 一、文件介绍: 2 | 3 | ## 1.SDK接口文件 4 | 5 | 安卓:以Androidapi.JNI.baidu.mapapi 开头的文件为安卓SDK jar的接口文件(谢谢老猫提供的工具)。 6 | 7 | iOS:以iOSapi.BaiduMapAPI_ 开头的文件为iOS SDK Framework 的接口文件。 8 | 9 | ## 2.SDK功能实现文件 10 | 11 | BaiduMapAPI.SDKInitializer 初始化SDK 服务
12 | BaiduMapAPI.Search.CommTypes 搜索服务公共单元
13 | BaiduMapAPI.ViewService 地图服务
14 |    |--BaiduMapAPI.ViewService.iOS iOS平台地图服务
15 |    |--BaiduMapAPI.ViewService.Android 安卓平台地图服务
16 | BaiduMapAPI.LocationService 定位服务
17 |    |--BaiduMapAPI.LocationService.iOS iOS平台定位服务
18 |    |--BaiduMapAPI.LocationService.Android 安卓平台地定位服务
19 | BaiduMapAPI.PoiSearchService 兴趣点搜索服务
20 |    |--BaiduMapAPI.PoiSearchService .iOS iOS平台兴趣点搜索服务
21 |    |--BaiduMapAPI.PoiSearchService .Android 安卓平台兴趣点搜索服务
22 | BaiduMapAPI.NaviService 导航服务
23 |    |--BaiduMapAPI.NaviService.CommTypes 导航服务公共单元
24 |    |--BaiduMapAPI.ViewService.iOS iOS平台导航服务
25 |    |--BaiduMapAPI.ViewService.Android 安卓平台导航服务
26 | 27 | # 二、使用说明 28 | ## 1.初始化SDK(无论使用SDK什么功能必须先初始化SDK) 29 | 引用单元:BaiduMapAPI.SDKInitializer
30 | 示例代码: 31 | 32 | 33 | ``` 34 | TSDKInitializer.SDKInit(Your App Key); 35 | ``` 36 | 37 | 38 | ## 2.地图的展示 39 | 引用单元:BaiduMapAPI.ViewService
40 | 示例代码: 41 | 42 | ```pascal 43 | Var 44 | BaiduMapView:TBaiduMapView. 45 | BaiduMapView := TBaiduMapView.Create(Self); 46 | BaiduMapView.Parent := Self; 47 | BaiduMapView.Align := TAlignLayout.Client; 48 | BaiduMapView.ShowBaiduMap; 49 | 50 | ``` 51 | 52 | ## 3.定位 53 | 引用单元:BaiduMapAPI.LocationService
54 | 示例代码: 55 | 56 | 57 | ```pascal 58 | Var 59 | BaiduMapLocation :TBaiduMapLocation; 60 | BaiduMapLocation := TBaiduMapLocation.Create; 61 | BaiduMapLocation.LocationService.OnUserLocationWillChanged := DoUserLocationChanged; 62 | BaiduMapLocation.LocationService.InitLocation; 63 | BaiduMapLocation.LocationService.StopLocation; 64 | BaiduMapLocation.LocationService.StarLocation; 65 | ``` 66 | 67 | 68 | 说明:当用户位置发生变化后,会主动触发OnUserLocationWillChanged 69 | 70 | ## 4.兴趣点搜索 71 | 兴趣点搜索有:范围内检索、城市内检索、附近检索三种模式
72 | 引用单元:BaiduMapAPI.PoiSearchService
73 | 示例代码: 74 | 75 | 76 | ```pascal 77 | Var 78 | Option:TPoiSearchrOption; 79 | BaiduMapPoiSearch:TBaiduMapPoiSearch; 80 | begin 81 | BaiduMapPoiSearch:=TBaiduMapPoiSearch.Create; 82 | //城市类检索 83 | Option:=TPoiCitySearchOption.Create; 84 | TPoiCitySearchOption(Option).Keyword:='机场'; 85 | TPoiCitySearchOption(Option).City:='重庆'; 86 | TPoiCitySearchOption(Option).PageCapacity:=10; 87 | TPoiCitySearchOption(Option).PageNum:=0; 88 | TPoiCitySearchOption(Option).IsReturnAddr:=True; 89 | BaiduMapPoiSearch.PoiSearchService.OnGetPoiResult := DoGetPoiResult; 90 | BaiduMapPoiSearch.PoiSearchService.PoiSearch(Option); 91 | Option.Free; 92 | 93 | ``` 94 | 95 | 说明:检索成功后,会回调OnGetPoiResult 96 | 97 | 98 | ## Bug联系: 99 | Email:371889755@qq.com
100 | Tel:18523843322 101 | 102 | -------------------------------------------------------------------------------- /BaiduMapSDK/iOSapi.AVFoundation.Helper.pas: -------------------------------------------------------------------------------- 1 | unit iOSapi.AVFoundation.Helper; 2 | 3 | interface 4 | 5 | uses 6 | iOSapi.Foundation, iOSapi.AVFoundation; 7 | 8 | function AVEncoderAudioQualityKey: NSString; 9 | function AVAudioSessionCategoryPlayAndRecord: NSString; 10 | 11 | implementation 12 | 13 | function AVEncoderAudioQualityKey: NSString; 14 | begin 15 | Result := CocoaNSStringConst(libAVFoundation, 'AVEncoderAudioQualityKey'); 16 | end; 17 | 18 | function AVAudioSessionCategoryPlayAndRecord: NSString; 19 | begin 20 | result := CocoaNSStringConst( libAVFoundation, 'AVAudioSessionCategoryPlayAndRecord' ); 21 | end; 22 | 23 | end. 24 | -------------------------------------------------------------------------------- /BaiduMapSDK/iOSapi.BaiduMapAPI_Location.pas: -------------------------------------------------------------------------------- 1 | { *********************************************************** } 2 | { } 3 | { CodeGear Delphi Runtime Library } 4 | { } 5 | { Copyright(c) 2012-2014 Embarcadero Technologies, Inc. } 6 | { } 7 | { *********************************************************** } 8 | 9 | // 10 | // Delphi-Objective-C Bridge 11 | // Interfaces for Cocoa framework BaiduMapAPI_Location 12 | // 13 | 14 | unit iOSapi.BaiduMapAPI_Location; 15 | 16 | interface 17 | 18 | uses 19 | Macapi.CoreFoundation, 20 | Macapi.CoreServices, 21 | Macapi.Dispatch, 22 | 23 | Macapi.Mach, 24 | Macapi.ObjCRuntime, 25 | Macapi.ObjectiveC, 26 | 27 | iOSapi.BaiduMapAPI_Base, 28 | iOSapi.CocoaTypes, 29 | iOSapi.CoreLocation, 30 | iOSapi.Foundation; 31 | 32 | type 33 | 34 | // ===== Forward declarations ===== 35 | {$M+} 36 | BMKLocationServiceDelegate = interface; 37 | BMKLocationService = interface; 38 | 39 | // ===== Framework typedefs ===== 40 | {$M+} 41 | // ===== Interface declarations ===== 42 | 43 | BMKLocationServiceClass = interface(NSObjectClass) 44 | ['{68E0D760-79BF-49DC-9E2A-30BB275617C2}'] 45 | { class } procedure setLocationDistanceFilter(distanceFilter 46 | : CLLocationDistance); cdecl; 47 | { class } function getCurrentLocationDistanceFilter 48 | : CLLocationDistance; cdecl; 49 | { class } procedure setLocationDesiredAccuracy(desiredAccuracy 50 | : CLLocationAccuracy); cdecl; 51 | { class } function getCurrentLocationDesiredAccuracy 52 | : CLLocationAccuracy; cdecl; 53 | end; 54 | 55 | BMKLocationService = interface(NSObject) 56 | ['{07B048E3-7F0F-445D-8D88-7C66A9E64C35}'] 57 | function userLocation: BMKUserLocation; cdecl; 58 | procedure setDelegate(delegate: Pointer); cdecl; 59 | function delegate: Pointer; cdecl; 60 | procedure startUserLocationService; cdecl; 61 | procedure stopUserLocationService; cdecl; 62 | procedure setDistanceFilter(distanceFilter: CLLocationDistance); cdecl; 63 | function distanceFilter: CLLocationDistance; cdecl; 64 | procedure setDesiredAccuracy(desiredAccuracy: CLLocationAccuracy); cdecl; 65 | function desiredAccuracy: CLLocationAccuracy; cdecl; 66 | procedure setHeadingFilter(headingFilter: CLLocationDegrees); cdecl; 67 | function headingFilter: CLLocationDegrees; cdecl; 68 | procedure setPausesLocationUpdatesAutomatically 69 | (pausesLocationUpdatesAutomatically: Boolean); cdecl; 70 | function pausesLocationUpdatesAutomatically: Boolean; cdecl; 71 | procedure setAllowsBackgroundLocationUpdates(allowsBackgroundLocationUpdates 72 | : Boolean); cdecl; 73 | function allowsBackgroundLocationUpdates: Boolean; cdecl; 74 | end; 75 | 76 | TBMKLocationService = class(TOCGenericImport) 78 | end; 79 | 80 | PBMKLocationService = Pointer; 81 | 82 | // ===== Protocol declarations ===== 83 | 84 | BMKLocationServiceDelegate = interface(IObjectiveC) 85 | ['{0318E275-A978-4FF8-BCD5-825B88D73605}'] 86 | procedure willStartLocatingUser; cdecl; 87 | procedure didStopLocatingUser; cdecl; 88 | procedure didUpdateUserHeading(userLocation: BMKUserLocation); cdecl; 89 | procedure didUpdateBMKUserLocation(userLocation: BMKUserLocation); cdecl; 90 | procedure didFailToLocateUserWithError(error: NSError); cdecl; 91 | end; 92 | 93 | // ===== External functions ===== 94 | 95 | const 96 | libBaiduMapAPI_Location = 97 | '/System/Library/Frameworks/BaiduMapAPI_Location.framework/BaiduMapAPI_Location'; 98 | function BMKGetMapApiLocationComponentVersion: Pointer { NSString }; cdecl; 99 | external libBaiduMapAPI_Location name _PU + 100 | 'BMKGetMapApiLocationComponentVersion'; 101 | function BMKCheckLocationComponentIsLegal: Boolean; cdecl; 102 | external libBaiduMapAPI_Location name _PU + 103 | 'BMKCheckLocationComponentIsLegal'; 104 | 105 | implementation 106 | 107 | {$IF defined(IOS) and NOT defined(CPUARM)} 108 | 109 | uses 110 | Posix.Dlfcn; 111 | 112 | var 113 | BaiduMapAPI_LocationModule: THandle; 114 | 115 | {$ENDIF IOS} 116 | {$IF defined(IOS) and NOT defined(CPUARM)} 117 | 118 | initialization 119 | 120 | BaiduMapAPI_LocationModule := dlopen(MarshaledAString(libBaiduMapAPI_Location), 121 | RTLD_LAZY); 122 | 123 | finalization 124 | 125 | dlclose(BaiduMapAPI_LocationModule); 126 | {$ENDIF IOS} 127 | 128 | end. 129 | -------------------------------------------------------------------------------- /BaiduMapSDK/iOSapi.BaiduMapAPI_Navi.pas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhaoyipeng/FMXComponents/f7d75d6776040f68c840c1724ce694bcf911979d/BaiduMapSDK/iOSapi.BaiduMapAPI_Navi.pas -------------------------------------------------------------------------------- /ComponentsSource/AndroidManifest.template.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | 10 | 11 | <%uses-permission%> 12 | 13 | 21 | 22 | <%application-meta-data%> 23 | <%services%> 24 | 26 | 30 | 31 | 33 | 34 | 35 | 36 | 37 | 38 | <%activity%> 39 | <%receivers%> 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /ComponentsSource/DelphiZXIngQRCode.pas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhaoyipeng/FMXComponents/f7d75d6776040f68c840c1724ce694bcf911979d/ComponentsSource/DelphiZXIngQRCode.pas -------------------------------------------------------------------------------- /ComponentsSource/FMX.Animation.pas: -------------------------------------------------------------------------------- 1 | unit FMX.Animation; 2 | 3 | interface 4 | uses 5 | FMX.Ani; 6 | 7 | type 8 | TFMXAnimation = class(TAnimation) 9 | protected 10 | procedure ProcessAnimation; override; 11 | end; 12 | implementation 13 | 14 | { TFMXAnimation } 15 | 16 | procedure TFMXAnimation.ProcessAnimation; 17 | begin 18 | inherited; 19 | 20 | end; 21 | 22 | end. 23 | -------------------------------------------------------------------------------- /ComponentsSource/FMX.BezierAnimation.pas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhaoyipeng/FMXComponents/f7d75d6776040f68c840c1724ce694bcf911979d/ComponentsSource/FMX.BezierAnimation.pas -------------------------------------------------------------------------------- /ComponentsSource/FMX.BezierPanel.pas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhaoyipeng/FMXComponents/f7d75d6776040f68c840c1724ce694bcf911979d/ComponentsSource/FMX.BezierPanel.pas -------------------------------------------------------------------------------- /ComponentsSource/FMX.CalendarControlEd.pas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhaoyipeng/FMXComponents/f7d75d6776040f68c840c1724ce694bcf911979d/ComponentsSource/FMX.CalendarControlEd.pas -------------------------------------------------------------------------------- /ComponentsSource/FMX.ComponentsCommon.pas: -------------------------------------------------------------------------------- 1 | // *************************************************************************** 2 | // 3 | // FMXComponents 4 | // 5 | // Copyright 2017 谢顿 (zhaoyipeng@hotmail.com) 6 | // 7 | // https://github.com/zhaoyipeng/FMXComponents 8 | // 9 | // *************************************************************************** 10 | unit FMX.ComponentsCommon; 11 | 12 | interface 13 | 14 | uses 15 | System.Classes; 16 | 17 | const 18 | TFMXPlatforms = pidWin32 or pidWin64 or pidOSX32 or pidiOSSimulator or 19 | pidiOSDevice32 or pidiOSDevice64 or pidAndroid; 20 | implementation 21 | 22 | end. 23 | -------------------------------------------------------------------------------- /ComponentsSource/FMX.QRCode.pas: -------------------------------------------------------------------------------- 1 | unit FMX.QRCode; 2 | 3 | interface 4 | 5 | uses 6 | System.Classes, 7 | System.SysUtils, 8 | System.Types, 9 | System.UITypes, 10 | FMX.Types, 11 | FMX.Controls, 12 | FMX.Graphics, 13 | FMX.Objects, 14 | FMX.MultiResBitmap, 15 | FMX.Platform, 16 | FMX.ComponentsCommon, 17 | DelphiZXingQRCode; 18 | 19 | type 20 | [ComponentPlatformsAttribute(TFMXPlatforms)] 21 | TFMXQRCode = class(TControl) 22 | private 23 | FLines: TStrings; 24 | FNeedUpdate: Boolean; 25 | FForeGround: TAlphaColor; 26 | FBackGround: TAlphaColor; 27 | FQRImage: TBitmap; 28 | FQuietZone: Integer; 29 | FIcon: TImage; 30 | procedure SetLines(const Value: TStrings); 31 | function GetText: string; 32 | procedure SetText(const Value: string); 33 | procedure OnLinesChange(Sender: TObject); 34 | procedure Update; 35 | procedure SetForeGround(const Value: TAlphaColor); 36 | procedure SetBackGround(const Value: TAlphaColor); 37 | procedure CreateQRImage; 38 | procedure SetQuiteZone(const Value: Integer); 39 | function GetIconVisible: Boolean; 40 | procedure SetIconVisible(const Value: Boolean); 41 | function GetIconSize: TControlSize; 42 | procedure SetIconSize(const Value: TControlSize); 43 | function GetIconBitmap: TFixedMultiResBitmap; 44 | procedure SetIconBitmap(const Value: TFixedMultiResBitmap); 45 | protected 46 | procedure Paint;override; 47 | procedure Resize; override; 48 | public 49 | constructor Create(AOwner: TComponent); override; 50 | destructor Destroy;override; 51 | property Text: string read GetText write SetText; 52 | published 53 | property Align; 54 | property Anchors; 55 | property ClipChildren default False; 56 | property ClipParent default False; 57 | property Cursor default crDefault; 58 | property DragMode default TDragMode.dmManual; 59 | property EnableDragHighlight default True; 60 | property Enabled default True; 61 | property Locked default False; 62 | property Height; 63 | property HitTest default True; 64 | property Padding; 65 | property Opacity; 66 | property Margins; 67 | property PopupMenu; 68 | property Position; 69 | property RotationAngle; 70 | property RotationCenter; 71 | property Scale; 72 | property Size; 73 | property Visible default True; 74 | property Width; 75 | property BackGround: TAlphaColor read FBackGround write SetBackGround default TAlphaColors.White; 76 | property ForeGround: TAlphaColor read FForeGround write SetForeGround default TAlphaColors.Black; 77 | property IconBitmap: TFixedMultiResBitmap read GetIconBitmap write SetIconBitmap; 78 | property IconSize: TControlSize read GetIconSize write SetIconSize; 79 | property IconVisible: Boolean read GetIconVisible write SetIconVisible default False; 80 | property Lines: TStrings read FLines write SetLines; 81 | property QuiteZone: Integer read FQuietZone write SetQuiteZone default 2; 82 | { Drag and Drop events } 83 | property OnDragEnter; 84 | property OnDragLeave; 85 | property OnDragOver; 86 | property OnDragDrop; 87 | property OnDragEnd; 88 | { Mouse events } 89 | property OnClick; 90 | property OnDblClick; 91 | 92 | property OnMouseDown; 93 | property OnMouseMove; 94 | property OnMouseUp; 95 | property OnMouseWheel; 96 | property OnMouseEnter; 97 | property OnMouseLeave; 98 | 99 | property OnPainting; 100 | property OnPaint; 101 | property OnResize; 102 | {$IF (RTLVersion >= 32)} // Tokyo 103 | property OnResized; 104 | {$ENDIF} 105 | end; 106 | 107 | implementation 108 | 109 | { TFMXToast } 110 | 111 | constructor TFMXQRCode.Create(AOwner: TComponent); 112 | begin 113 | inherited; 114 | FQuietZone := 2; 115 | FBackGround := TAlphaColors.White; 116 | FForeGround := TAlphaColors.Black; 117 | FLines := TStringList.Create; 118 | FLines.Text := 'https://github.com/zhaoyipeng/FMXComponents'; 119 | TStringList(FLines).OnChange := OnLinesChange; 120 | FIcon := TImage.Create(Self); 121 | FIcon.Parent := Self; 122 | FIcon.Align := TAlignLayout.Center; 123 | FIcon.Visible := False; 124 | FIcon.Stored := False; 125 | FIcon.Width := 48; 126 | FIcon.Height := 48; 127 | 128 | FQRImage := nil; 129 | FNeedUpdate := True; 130 | SetSize(148, 148); 131 | end; 132 | 133 | procedure TFMXQRCode.CreateQRImage; 134 | var 135 | QRCode: TDelphiZXingQRCode; 136 | Row, Column, I, J: Integer; 137 | Data: TBitmapData; 138 | ScreenService: IFMXScreenService; 139 | Scale1: Single; 140 | begin 141 | if TPlatformServices.Current.SupportsPlatformService(IFMXScreenService, ScreenService) then 142 | Scale1 := ScreenService.GetScreenScale 143 | else 144 | Scale1 := 1; 145 | if FNeedUpdate then 146 | begin 147 | if not Assigned(FQRImage) then 148 | FQRImage := TBitmap.Create( 149 | Round(Scale1 * Self.Width), Round(Scale1 * Self.Height)); 150 | QRCode := TDelphiZXingQRCode.Create; 151 | try 152 | QRCode.Data := Text; 153 | QRCode.Encoding := TQRCodeEncoding.qrAuto; 154 | QRCode.QuietZone := FQuietZone; 155 | FQRImage.Map(TMapAccess.Write, Data); 156 | try 157 | for Row := 0 to FQRImage.Height - 1 do 158 | begin 159 | J := Row * QRCode.Rows div FQRImage.Height; 160 | for Column := 0 to FQRImage.Width - 1 do 161 | begin 162 | I := Column * QRCode.Columns div FQRImage.Width; 163 | if (QRCode.IsBlack[J, I]) then 164 | begin 165 | Data.SetPixel(Column, Row, FForeGround); 166 | end 167 | else 168 | begin 169 | Data.SetPixel(Column, Row, FBackGround); 170 | end; 171 | end; 172 | end; 173 | finally 174 | FQRImage.Unmap(Data); 175 | end; 176 | finally 177 | QRCode.Free; 178 | end; 179 | FNeedUpdate := False; 180 | end; 181 | end; 182 | 183 | destructor TFMXQRCode.Destroy; 184 | begin 185 | FQRImage.Free; 186 | inherited; 187 | end; 188 | 189 | function TFMXQRCode.GetIconBitmap: TFixedMultiResBitmap; 190 | begin 191 | Result := FIcon.MultiResBitmap; 192 | end; 193 | 194 | function TFMXQRCode.GetIconSize: TControlSize; 195 | begin 196 | Result := FIcon.Size; 197 | end; 198 | 199 | function TFMXQRCode.GetIconVisible: Boolean; 200 | begin 201 | Result := FIcon.Visible; 202 | end; 203 | 204 | function TFMXQRCode.GetText: string; 205 | begin 206 | Result := FLines.Text; 207 | end; 208 | 209 | procedure TFMXQRCode.OnLinesChange(Sender: TObject); 210 | begin 211 | Update; 212 | end; 213 | 214 | procedure TFMXQRCode.Paint; 215 | //var 216 | // Brush: TBrush; 217 | begin 218 | inherited; 219 | CreateQRImage; 220 | Canvas.DrawBitmap(FQRImage, 221 | FQRImage.Bounds, 222 | RectF(0,0,Width,Height), 223 | AbsoluteOpacity, 224 | True 225 | ); 226 | end; 227 | 228 | procedure TFMXQRCode.Resize; 229 | begin 230 | inherited; 231 | Update; 232 | Repaint; 233 | end; 234 | 235 | procedure TFMXQRCode.SetBackGround(const Value: TAlphaColor); 236 | begin 237 | if FBackGround <> Value then 238 | begin 239 | FBackGround := Value; 240 | Update; 241 | end; 242 | end; 243 | 244 | procedure TFMXQRCode.SetForeGround(const Value: TAlphaColor); 245 | begin 246 | if FForeGround <> Value then 247 | begin 248 | FForeGround := Value; 249 | Update; 250 | end; 251 | end; 252 | 253 | procedure TFMXQRCode.SetIconBitmap(const Value: TFixedMultiResBitmap); 254 | begin 255 | FIcon.MultiResBitmap := Value; 256 | end; 257 | 258 | procedure TFMXQRCode.SetIconSize(const Value: TControlSize); 259 | begin 260 | FIcon.Size := Value; 261 | end; 262 | 263 | procedure TFMXQRCode.SetIconVisible(const Value: Boolean); 264 | begin 265 | FIcon.Visible := Value; 266 | end; 267 | 268 | procedure TFMXQRCode.SetLines(const Value: TStrings); 269 | begin 270 | FLines.Assign(Value); 271 | end; 272 | 273 | procedure TFMXQRCode.SetQuiteZone(const Value: Integer); 274 | begin 275 | if FQuietZone <> Value then 276 | begin 277 | FQuietZone := Value; 278 | Update; 279 | end; 280 | end; 281 | 282 | procedure TFMXQRCode.SetText(const Value: string); 283 | begin 284 | FLines.Text := Value; 285 | end; 286 | 287 | procedure TFMXQRCode.Update; 288 | begin 289 | FNeedUpdate := True; 290 | Repaint; 291 | end; 292 | 293 | end. 294 | -------------------------------------------------------------------------------- /ComponentsSource/FMX.RainingBarEd.pas: -------------------------------------------------------------------------------- 1 | unit FMX.RainingBarEd; 2 | 3 | interface 4 | 5 | uses 6 | System.Classes, 7 | DesignIntf, 8 | DesignEditors, 9 | DesignMenus, 10 | FMX.RatingBar; 11 | 12 | type 13 | TFMXRatingBarComponentEditor = class(TComponentEditor) 14 | private 15 | procedure MenuItemHandler(Sender: TObject); 16 | public 17 | procedure PrepareItem(index: Integer; const AItem: IMenuItem); override; 18 | procedure Edit; override; 19 | procedure ExecuteVerb(index: Integer); override; 20 | function GetVerb(index: Integer): string; override; 21 | function GetVerbCount: Integer; override; 22 | end; 23 | 24 | procedure register; 25 | 26 | implementation 27 | 28 | procedure register; 29 | begin 30 | RegisterComponentEditor(TFMXRatingBar, TFMXRatingBarComponentEditor); 31 | end; 32 | 33 | 34 | { TLogGraphComponentEditor } 35 | 36 | procedure TFMXRatingBarComponentEditor.Edit; 37 | begin 38 | inherited; 39 | end; 40 | 41 | procedure TFMXRatingBarComponentEditor.ExecuteVerb(index: Integer); 42 | begin 43 | inherited; 44 | 45 | end; 46 | 47 | function TFMXRatingBarComponentEditor.GetVerb(index: Integer): string; 48 | begin 49 | case index of 50 | 0: 51 | Result := 'Shape'; 52 | end; 53 | end; 54 | 55 | function TFMXRatingBarComponentEditor.GetVerbCount: Integer; 56 | begin 57 | Result := 1; 58 | end; 59 | 60 | procedure TFMXRatingBarComponentEditor.MenuItemHandler(Sender: TObject); 61 | var 62 | CompOwner: TComponent; 63 | rb: TFMXRatingBar; 64 | begin 65 | CompOwner := Designer.GetRoot; 66 | if CompOwner <> nil then 67 | begin 68 | rb := TFMXRatingBar(Component); 69 | case (Sender as TComponent).Tag of 70 | 0: // Star 71 | rb.Data.Data := 'm 4677,2657 -1004,727 385,1179 -1002,-731 -1002,731 386,-1179 -1005,-727 1240,3 381,-1181 381,1181 z'; 72 | 1: // Heart 73 | rb.Data.Data := 'M 23.252905,18.859647 A 30,30 0 0 1 65.679312,61.286053 L 23.252905,103.71246 -19.173502,61.286053 A 30,30 0 0 1 23.252905,18.859647'; 74 | 2: // Diamond 75 | rb.Data.Data := 'm 102.49805,188.72848 13.22984,-13.43029 53.15322,0.0668 12.99598,13.22984 -39.65611,39.75635 z'; 76 | end; 77 | Designer.Modified; 78 | end; 79 | end; 80 | 81 | procedure TFMXRatingBarComponentEditor.PrepareItem(index: Integer; 82 | const AItem: IMenuItem); 83 | var 84 | MenuItem: IMenuItem; 85 | begin 86 | case Index of 87 | 0: 88 | begin 89 | MenuItem := AItem.AddItem('Star', 0, False, True, MenuItemHandler); 90 | MenuItem.Tag := 0; 91 | MenuItem := nil; 92 | MenuItem := AItem.AddItem('Heart', 0, False, True, MenuItemHandler); 93 | MenuItem.Tag := 1; 94 | MenuItem := nil; 95 | MenuItem := AItem.AddItem('Diamond', 0, False, True, MenuItemHandler); 96 | MenuItem.Tag := 2; 97 | MenuItem := nil; 98 | end; 99 | end; 100 | end; 101 | 102 | end. 103 | -------------------------------------------------------------------------------- /ComponentsSource/FMX.RegComponents.pas: -------------------------------------------------------------------------------- 1 | // *************************************************************************** 2 | // 3 | // FMXComponents: Firemonkey Opensource Components Set 4 | // 5 | // Copyright 2017 谢顿 (zhaoyipeng@hotmail.com) 6 | // 7 | // https://github.com/zhaoyipeng/FMXComponents 8 | // 9 | // *************************************************************************** 10 | unit FMX.RegComponents; 11 | 12 | interface 13 | 14 | uses 15 | System.Classes 16 | // 可根据需要注释调不需要的控件单元和注册 17 | , FMX.CircleScoreIndicator 18 | , FMX.ImageSlider 19 | , FMX.RatingBar 20 | , FMX.ScrollableList 21 | , FMX.SimpleBBCodeText 22 | , FMX.GesturePassword 23 | , FMX.CalendarControl 24 | , FMX.Seg7Shape 25 | , FMX.Toast 26 | , FMX.QRCode 27 | , FMX.LoadingIndicator 28 | , FMX.Callout 29 | , FMX.RotatingText 30 | , FMX.BezierAnimation 31 | , FMX.BezierPanel 32 | ; 33 | 34 | procedure Register; 35 | 36 | implementation 37 | 38 | const 39 | FMX_COMPONENTS_PALETTE = 'FMXComponents'; 40 | 41 | procedure Register; 42 | begin 43 | RegisterComponents(FMX_COMPONENTS_PALETTE, [TFMXCircleScoreIndicator]); 44 | RegisterComponents(FMX_COMPONENTS_PALETTE, [TFMXImageSlider]); 45 | RegisterComponents(FMX_COMPONENTS_PALETTE, [TFMXRatingBar]); 46 | RegisterComponents(FMX_COMPONENTS_PALETTE, [TFMXScrollableList]); 47 | RegisterComponents(FMX_COMPONENTS_PALETTE, [TFMXSimpleBBCodeText]); 48 | RegisterComponents(FMX_COMPONENTS_PALETTE, [TFMXGesturePassword]); 49 | RegisterComponents(FMX_COMPONENTS_PALETTE, [TFMXCalendarControl]); 50 | RegisterComponents(FMX_COMPONENTS_PALETTE, [TFMXSeg7Shape]); 51 | RegisterComponents(FMX_COMPONENTS_PALETTE, [TFMXToast]); 52 | RegisterComponents(FMX_COMPONENTS_PALETTE, [TFMXQRCode]); 53 | RegisterComponents(FMX_COMPONENTS_PALETTE, [TFMXLoadingIndicator]); 54 | RegisterComponents(FMX_COMPONENTS_PALETTE, [TFMXCallout]); 55 | RegisterComponents(FMX_COMPONENTS_PALETTE, [TFMXRotatingText]); 56 | RegisterComponents(FMX_COMPONENTS_PALETTE, [TFMXBezierAnimation]); 57 | RegisterComponents(FMX_COMPONENTS_PALETTE, [TFMXBezierPanel]); 58 | 59 | end; 60 | 61 | end. 62 | -------------------------------------------------------------------------------- /ComponentsSource/FMX.RotatingText.pas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhaoyipeng/FMXComponents/f7d75d6776040f68c840c1724ce694bcf911979d/ComponentsSource/FMX.RotatingText.pas -------------------------------------------------------------------------------- /ComponentsSource/FMX.ScrollableList.pas: -------------------------------------------------------------------------------- 1 | // *************************************************************************** 2 | // 3 | // A Simple Firemonkey Scrolleable List Component 4 | // 5 | // Copyright 2017 谢顿 (zhaoyipeng@hotmail.com) 6 | // 7 | // https://github.com/zhaoyipeng/FMXComponents 8 | // 9 | // *************************************************************************** 10 | unit FMX.ScrollableList; 11 | 12 | interface 13 | 14 | uses 15 | System.Classes, 16 | System.SysUtils, 17 | System.Math, 18 | System.Math.Vectors, 19 | System.Types, 20 | System.UITypes, 21 | FMX.Types, 22 | FMX.Layouts, 23 | FMX.Graphics, 24 | FMX.Controls, 25 | FMX.Objects, 26 | FMX.Ani, 27 | FMX.ComponentsCommon; 28 | 29 | type 30 | 31 | [ComponentPlatformsAttribute(TFMXPlatforms)] 32 | TFMXScrollableList = class(TLayout) 33 | private 34 | FContainer: TLayout; 35 | FItemIndex: Integer; 36 | FTextList: TArray; 37 | FDownPos: Single; 38 | FIsDown: Boolean; 39 | FDownIndex: Integer; 40 | FAnimation: TFloatAnimation; 41 | FItems: TStrings; 42 | FItemHeight: Single; 43 | FOnChange: TNotifyEvent; 44 | FSelectedColor: TAlphaColor; 45 | FSelectedItemHeight: Single; 46 | FDownItem: Integer; 47 | procedure AdjustTexts; 48 | procedure SetItemIndex(const Value: Integer); 49 | procedure CreateTexts; 50 | procedure SetItems(const Value: TStrings); 51 | procedure SetItemHeight(const Value: Single); 52 | procedure SetOnChange(const Value: TNotifyEvent); 53 | procedure SetSelectedColor(const Value: TAlphaColor); 54 | procedure SetSelectedItemHeight(const Value: Single); 55 | protected 56 | procedure Resize; override; 57 | procedure MouseDown(Button: TMouseButton; Shift: TShiftState; 58 | X, Y: Single); override; 59 | procedure MouseMove(Shift: TShiftState; X, Y: Single); override; 60 | procedure MouseUp(Button: TMouseButton; Shift: TShiftState; 61 | X, Y: Single); override; 62 | public 63 | constructor Create(AOwner: TComponent); override; 64 | procedure Loaded; override; 65 | destructor Destroy; override; 66 | procedure SetData(const AList: TArray); reintroduce; 67 | function GetSelected: string; 68 | published 69 | property SelectedColor: TAlphaColor read FSelectedColor 70 | write SetSelectedColor default $FF1EB9C1 ; 71 | property ItemHeight: Single read FItemHeight write SetItemHeight; 72 | property SelectedItemHeight: Single read FSelectedItemHeight write SetSelectedItemHeight; 73 | property Items: TStrings read FItems write SetItems; 74 | property ItemIndex: Integer read FItemIndex write SetItemIndex; 75 | property OnChange: TNotifyEvent read FOnChange write SetOnChange; 76 | end; 77 | 78 | implementation 79 | 80 | { TFMXScrollYears } 81 | 82 | procedure TFMXScrollableList.AdjustTexts; 83 | var 84 | I: Integer; 85 | begin 86 | for I := 0 to High(FTextList) do 87 | begin 88 | if I = FItemIndex then 89 | begin 90 | FTextList[I].Height := SelectedItemHeight; 91 | FTextList[I].TextSettings.Font.Size := 18; 92 | FTextList[I].TextSettings.FontColor := $FF1EB9C1; 93 | end 94 | else 95 | begin 96 | FTextList[I].Height := ItemHeight; 97 | FTextList[I].TextSettings.Font.Size := 18; 98 | FTextList[I].TextSettings.FontColor := TAlphaColors.Black; 99 | end; 100 | end; 101 | end; 102 | 103 | constructor TFMXScrollableList.Create(AOwner: TComponent); 104 | begin 105 | inherited; 106 | FItemHeight := 52; 107 | FSelectedItemHeight := 59; 108 | Width := 64; 109 | Height := FItemHeight * 3; 110 | FItems := TStringList.Create; 111 | FItems.AddStrings(['2000', '2003', '2005', '2008', '2010', '2014', '2016']); 112 | FIsDown := False; 113 | FItemIndex := 0; 114 | HitTest := True; 115 | ClipChildren := True; 116 | AutoCapture := True; 117 | 118 | FContainer := TLayout.Create(Self); 119 | FContainer.Position.X := 0; 120 | FContainer.Position.Y := ItemHeight; 121 | FContainer.Width := Width; 122 | FContainer.Height := FItemHeight * FItems.Count; 123 | FContainer.Stored := False; 124 | FContainer.Parent := Self; 125 | FAnimation := TFloatAnimation.Create(Self); 126 | FAnimation.PropertyName := 'Position.Y'; 127 | FAnimation.Parent := FContainer; 128 | FAnimation.Duration := 0.1; 129 | end; 130 | 131 | procedure TFMXScrollableList.CreateTexts; 132 | var 133 | I: Integer; 134 | t: TText; 135 | Y: Single; 136 | begin 137 | 138 | for I := High(FTextList) downto 0 do 139 | begin 140 | FTextList[I].DisposeOf; 141 | end; 142 | 143 | FContainer.Height := (FItemHeight * FItems.Count-1) + FSelectedItemHeight; 144 | 145 | SetLength(FTextList, FItems.Count); 146 | Y := 0; 147 | for I := 0 to FItems.Count - 1 do 148 | begin 149 | t := TText.Create(Self); 150 | t.Stored := False; 151 | t.Text := FItems[I]; 152 | t.Position.X := 0; 153 | t.Position.Y := Y; 154 | if I = ItemIndex then 155 | t.Height := SelectedItemHeight 156 | else 157 | t.Height := ItemHeight; 158 | t.Width := Width; 159 | t.HitTest := False; 160 | t.Parent := FContainer; 161 | FTextList[I] := t; 162 | Y := Y + t.Height; 163 | end; 164 | AdjustTexts; 165 | end; 166 | 167 | destructor TFMXScrollableList.Destroy; 168 | begin 169 | FItems.Free; 170 | inherited; 171 | end; 172 | 173 | function TFMXScrollableList.GetSelected: string; 174 | begin 175 | Result := FItems[ItemIndex]; 176 | end; 177 | 178 | procedure TFMXScrollableList.Loaded; 179 | begin 180 | inherited; 181 | CreateTexts; 182 | end; 183 | 184 | procedure TFMXScrollableList.MouseDown(Button: TMouseButton; Shift: TShiftState; X, 185 | Y: Single); 186 | begin 187 | inherited; 188 | FDownPos := Y; 189 | FDownIndex := FItemIndex; 190 | FIsDown := True; 191 | FDownItem := ItemIndex; 192 | end; 193 | 194 | procedure TFMXScrollableList.MouseMove(Shift: TShiftState; X, Y: Single); 195 | var 196 | Delta, NewY: Single; 197 | begin 198 | inherited; 199 | if FIsDown then 200 | begin 201 | Delta := Y - FDownPos; 202 | NewY := (1 - FDownIndex) * FItemHeight + Delta; 203 | NewY := Max(Min(FItemHeight, NewY), (2 - FItems.Count) * FItemHeight); 204 | 205 | ItemIndex := Round(-NewY / FItemHeight) + 1; 206 | FContainer.Position.Y := NewY; 207 | end; 208 | end; 209 | 210 | procedure TFMXScrollableList.MouseUp(Button: TMouseButton; Shift: TShiftState; X, 211 | Y: Single); 212 | var 213 | AdjustY: Single; 214 | begin 215 | inherited; 216 | if FIsDown then 217 | begin 218 | FIsDown := False; 219 | AdjustY := (1 - ItemIndex) * FItemHeight; 220 | FAnimation.StartValue := FContainer.Position.Y; 221 | FAnimation.StopValue := AdjustY; 222 | FAnimation.Start; 223 | 224 | if ItemIndex <> FDownItem then 225 | begin 226 | if Assigned(FOnChange) then 227 | begin 228 | FOnChange(Self); 229 | end; 230 | end; 231 | end; 232 | end; 233 | 234 | procedure TFMXScrollableList.Resize; 235 | var 236 | I: Integer; 237 | begin 238 | inherited; 239 | Height := FItemHeight * 3; 240 | if Assigned(FContainer) then 241 | FContainer.Width := Width; 242 | for I := 0 to High(FTextList) do 243 | begin 244 | FTextList[I].Width := Width; 245 | end; 246 | end; 247 | 248 | procedure TFMXScrollableList.SetItemHeight(const Value: Single); 249 | begin 250 | if FItemHeight <> Value then 251 | begin 252 | FItemHeight := Value; 253 | Height := 3 * FItemHeight; 254 | end; 255 | end; 256 | 257 | procedure TFMXScrollableList.SetItemIndex(const Value: Integer); 258 | begin 259 | if FItemIndex <> Value then 260 | begin 261 | FItemIndex := Value; 262 | CreateTexts; 263 | AdjustTexts; 264 | FContainer.Position.Y := -(FItemIndex-1) * ItemHeight; 265 | end; 266 | end; 267 | 268 | procedure TFMXScrollableList.SetItems(const Value: TStrings); 269 | begin 270 | FItems.Assign(Value); 271 | FItemIndex := -1; 272 | CreateTexts; 273 | end; 274 | 275 | procedure TFMXScrollableList.SetOnChange(const Value: TNotifyEvent); 276 | begin 277 | FOnChange := Value; 278 | end; 279 | 280 | procedure TFMXScrollableList.SetSelectedColor(const Value: TAlphaColor); 281 | begin 282 | if FSelectedColor <> Value then 283 | begin 284 | FSelectedColor := Value; 285 | AdjustTexts; 286 | end; 287 | end; 288 | 289 | procedure TFMXScrollableList.SetSelectedItemHeight(const Value: Single); 290 | begin 291 | FSelectedItemHeight := Value; 292 | end; 293 | 294 | procedure TFMXScrollableList.SetData(const AList: TArray); 295 | begin 296 | FItems.Clear; 297 | FItems.AddStrings(AList); 298 | FItemIndex := -1; 299 | CreateTexts; 300 | end; 301 | 302 | end. 303 | -------------------------------------------------------------------------------- /ComponentsSource/FMX.Toast.pas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhaoyipeng/FMXComponents/f7d75d6776040f68c840c1724ce694bcf911979d/ComponentsSource/FMX.Toast.pas -------------------------------------------------------------------------------- /ComponentsSource/FMXComponentEd.dpk: -------------------------------------------------------------------------------- 1 | package FMXComponentEd; 2 | 3 | {$R *.res} 4 | {$IFDEF IMPLICITBUILDING This IFDEF should not be used by users} 5 | {$ALIGN 8} 6 | {$ASSERTIONS ON} 7 | {$BOOLEVAL OFF} 8 | {$DEBUGINFO OFF} 9 | {$EXTENDEDSYNTAX ON} 10 | {$IMPORTEDDATA ON} 11 | {$IOCHECKS ON} 12 | {$LOCALSYMBOLS ON} 13 | {$LONGSTRINGS ON} 14 | {$OPENSTRINGS ON} 15 | {$OPTIMIZATION OFF} 16 | {$OVERFLOWCHECKS OFF} 17 | {$RANGECHECKS OFF} 18 | {$REFERENCEINFO ON} 19 | {$SAFEDIVIDE OFF} 20 | {$STACKFRAMES ON} 21 | {$TYPEDADDRESS OFF} 22 | {$VARSTRINGCHECKS ON} 23 | {$WRITEABLECONST OFF} 24 | {$MINENUMSIZE 1} 25 | {$IMAGEBASE $400000} 26 | {$DEFINE DEBUG} 27 | {$ENDIF IMPLICITBUILDING} 28 | {$IMPLICITBUILD ON} 29 | 30 | requires 31 | rtl, 32 | designide, 33 | fmx, 34 | FMXComponents; 35 | 36 | contains 37 | FMX.RainingBarEd in 'FMX.RainingBarEd.pas', 38 | FMX.CalendarControlEd in 'FMX.CalendarControlEd.pas'; 39 | 40 | end. 41 | -------------------------------------------------------------------------------- /ComponentsSource/FMXComponents.dpk: -------------------------------------------------------------------------------- 1 | package FMXComponents; 2 | 3 | {$R *.res} 4 | {$IFDEF IMPLICITBUILDING This IFDEF should not be used by users} 5 | {$ALIGN 8} 6 | {$ASSERTIONS ON} 7 | {$BOOLEVAL OFF} 8 | {$DEBUGINFO OFF} 9 | {$EXTENDEDSYNTAX ON} 10 | {$IMPORTEDDATA ON} 11 | {$IOCHECKS ON} 12 | {$LOCALSYMBOLS ON} 13 | {$LONGSTRINGS ON} 14 | {$OPENSTRINGS ON} 15 | {$OPTIMIZATION OFF} 16 | {$OVERFLOWCHECKS OFF} 17 | {$RANGECHECKS OFF} 18 | {$REFERENCEINFO ON} 19 | {$SAFEDIVIDE OFF} 20 | {$STACKFRAMES ON} 21 | {$TYPEDADDRESS OFF} 22 | {$VARSTRINGCHECKS ON} 23 | {$WRITEABLECONST OFF} 24 | {$MINENUMSIZE 1} 25 | {$IMAGEBASE $400000} 26 | {$DEFINE DEBUG} 27 | {$ENDIF IMPLICITBUILDING} 28 | {$IMPLICITBUILD ON} 29 | 30 | requires 31 | rtl, 32 | fmx; 33 | 34 | contains 35 | FMX.BezierAnimation in 'FMX.BezierAnimation.pas', 36 | FMX.CalendarControl in 'FMX.CalendarControl.pas', 37 | FMX.CalendarItemAppearance in 'FMX.CalendarItemAppearance.pas', 38 | FMX.CircleScoreIndicator in 'FMX.CircleScoreIndicator.pas', 39 | FMX.ComponentsCommon in 'FMX.ComponentsCommon.pas', 40 | FMX.GesturePassword in 'FMX.GesturePassword.pas', 41 | FMX.Graphics.INativeCanvas in 'FMX.Graphics.INativeCanvas.pas', 42 | FMX.Graphics.NativeCanvas in 'FMX.Graphics.NativeCanvas.pas', 43 | FMX.ImageSlider in 'FMX.ImageSlider.pas', 44 | FMX.LoadingIndicator in 'FMX.LoadingIndicator.pas', 45 | FMX.QRCode in 'FMX.QRCode.pas', 46 | FMX.RatingBar in 'FMX.RatingBar.pas', 47 | FMX.RegComponents in 'FMX.RegComponents.pas', 48 | FMX.ScrollableList in 'FMX.ScrollableList.pas', 49 | FMX.Seg7Shape in 'FMX.Seg7Shape.pas', 50 | FMX.SimpleBBCodeText in 'FMX.SimpleBBCodeText.pas', 51 | FMX.Toast in 'FMX.Toast.pas', 52 | FMX.Callout in 'FMX.Callout.pas', 53 | FMX.RotatingText in 'FMX.RotatingText.pas', 54 | FMX.Animation in 'FMX.Animation.pas', 55 | FMX.BezierPanel in 'FMX.BezierPanel.pas'; 56 | 57 | end. 58 | -------------------------------------------------------------------------------- /ComponentsSource/FMXComponents.inc: -------------------------------------------------------------------------------- 1 | {$IF RTLVersion>=32} // Rad Studio Tokyo 2 | {$DEFINE VER320_up} 3 | {$IFEND} 4 | -------------------------------------------------------------------------------- /ComponentsSource/FMXComponents.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhaoyipeng/FMXComponents/f7d75d6776040f68c840c1724ce694bcf911979d/ComponentsSource/FMXComponents.res -------------------------------------------------------------------------------- /ComponentsSource/NativeDraw.inc: -------------------------------------------------------------------------------- 1 | {$SCOPEDENUMS ON} 2 | 3 | {$IFDEF MACOS} 4 | {$IFNDEF IOS} 5 | {$DEFINE MACOSONLY} 6 | {$ENDIF} 7 | {$ENDIF} 8 | 9 | 10 | -------------------------------------------------------------------------------- /ComponentsSource/Res/1@/PasswordBackground@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhaoyipeng/FMXComponents/f7d75d6776040f68c840c1724ce694bcf911979d/ComponentsSource/Res/1@/PasswordBackground@1x.png -------------------------------------------------------------------------------- /ComponentsSource/Res/1@/PasswordCircle@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhaoyipeng/FMXComponents/f7d75d6776040f68c840c1724ce694bcf911979d/ComponentsSource/Res/1@/PasswordCircle@1x.png -------------------------------------------------------------------------------- /ComponentsSource/Res/1@/PasswordPoint@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhaoyipeng/FMXComponents/f7d75d6776040f68c840c1724ce694bcf911979d/ComponentsSource/Res/1@/PasswordPoint@1x.png -------------------------------------------------------------------------------- /ComponentsSource/Res/2@/PasswordBackground@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhaoyipeng/FMXComponents/f7d75d6776040f68c840c1724ce694bcf911979d/ComponentsSource/Res/2@/PasswordBackground@2x.png -------------------------------------------------------------------------------- /ComponentsSource/Res/2@/PasswordCircle@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhaoyipeng/FMXComponents/f7d75d6776040f68c840c1724ce694bcf911979d/ComponentsSource/Res/2@/PasswordCircle@2x.png -------------------------------------------------------------------------------- /ComponentsSource/Res/2@/PasswordPoint@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhaoyipeng/FMXComponents/f7d75d6776040f68c840c1724ce694bcf911979d/ComponentsSource/Res/2@/PasswordPoint@2x.png -------------------------------------------------------------------------------- /ComponentsSource/Res/3@/PasswordBackground@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhaoyipeng/FMXComponents/f7d75d6776040f68c840c1724ce694bcf911979d/ComponentsSource/Res/3@/PasswordBackground@3x.png -------------------------------------------------------------------------------- /ComponentsSource/Res/3@/PasswordCircle@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhaoyipeng/FMXComponents/f7d75d6776040f68c840c1724ce694bcf911979d/ComponentsSource/Res/3@/PasswordCircle@3x.png -------------------------------------------------------------------------------- /ComponentsSource/Res/3@/PasswordPoint@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhaoyipeng/FMXComponents/f7d75d6776040f68c840c1724ce694bcf911979d/ComponentsSource/Res/3@/PasswordPoint@3x.png -------------------------------------------------------------------------------- /ComponentsSource/Seg7ShapeFmx.dcr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhaoyipeng/FMXComponents/f7d75d6776040f68c840c1724ce694bcf911979d/ComponentsSource/Seg7ShapeFmx.dcr -------------------------------------------------------------------------------- /ComponentsSource/Seg7ShapeFmxLICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2013 Yamasho 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | this software and associated documentation files (the "Software"), to deal in 7 | the Software without restriction, including without limitation the rights to 8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 9 | the Software, and to permit persons to whom the Software is furnished to do so, 10 | subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /Demo/AndroidManifest.template.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | 10 | 11 | <%uses-permission%> 12 | 13 | 21 | 22 | <%application-meta-data%> 23 | <%services%> 24 | 26 | 30 | 31 | 33 | 34 | 35 | 36 | 37 | 38 | <%activity%> 39 | <%receivers%> 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /Demo/CalendarDemo/.gitignore: -------------------------------------------------------------------------------- 1 | /__history 2 | /Win32 3 | /Android 4 | /CalendarDemo.res 5 | -------------------------------------------------------------------------------- /Demo/CalendarDemo/AndroidManifest.template.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | 10 | 11 | <%uses-permission%> 12 | 13 | 21 | 22 | <%application-meta-data%> 23 | <%services%> 24 | 26 | 30 | 31 | 33 | 34 | 35 | 36 | 37 | 38 | <%activity%> 39 | <%receivers%> 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /Demo/CalendarDemo/CalendarDemo.dpr: -------------------------------------------------------------------------------- 1 | program CalendarDemo; 2 | 3 | uses 4 | System.StartUpCopy, 5 | FMX.Forms, 6 | CalendarDemoMain in 'CalendarDemoMain.pas' {CalendarDemoMainForm}; 7 | 8 | {$R *.res} 9 | 10 | begin 11 | Application.Initialize; 12 | Application.CreateForm(TCalendarDemoMainForm, CalendarDemoMainForm); 13 | Application.Run; 14 | end. 15 | -------------------------------------------------------------------------------- /Demo/CalendarDemo/CalendarDemoMain.fmx: -------------------------------------------------------------------------------- 1 | object CalendarDemoMainForm: TCalendarDemoMainForm 2 | Left = 0 3 | Top = 0 4 | Caption = 'Calendar Demo' 5 | ClientHeight = 480 6 | ClientWidth = 366 7 | FormFactor.Width = 320 8 | FormFactor.Height = 480 9 | FormFactor.Devices = [Desktop] 10 | OnCreate = FormCreate 11 | DesignerMasterStyle = 0 12 | object Rectangle1: TRectangle 13 | Align = Client 14 | Fill.Color = xFFF0F0F0 15 | Size.Width = 366.000000000000000000 16 | Size.Height = 436.000000000000000000 17 | Size.PlatformDefault = False 18 | Stroke.Kind = None 19 | object FMXCalendarControl1: TFMXCalendarControl 20 | Align = Client 21 | Size.Width = 366.000000000000000000 22 | Size.Height = 320.000000000000000000 23 | Size.PlatformDefault = False 24 | Lang = 'en' 25 | StartDate = 42948.000000000000000000 26 | EndDate = 43020.422420370370000000 27 | FirstDayOfWeek = 7 28 | SelectedDate = 43178.000000000000000000 29 | IsShowLunarDate = False 30 | OnSelectedItem = FMXCalendarControl1SelectedItem 31 | end 32 | object Layout7: TLayout 33 | Align = Top 34 | Size.Width = 366.000000000000000000 35 | Size.Height = 44.000000000000000000 36 | Size.PlatformDefault = False 37 | TabOrder = 1 38 | object chkShowLunarDate: TCheckBox 39 | Position.X = 8.000000000000000000 40 | Position.Y = 12.000000000000000000 41 | Size.Width = 97.000000000000000000 42 | Size.Height = 19.000000000000000000 43 | Size.PlatformDefault = False 44 | TabOrder = 0 45 | Text = #26174#31034#20892#21382 46 | OnChange = chkShowLunarDateChange 47 | end 48 | end 49 | object Rectangle2: TRectangle 50 | Align = Bottom 51 | Fill.Color = claWhite 52 | Margins.Top = 8.000000000000000000 53 | Position.Y = 372.000000000000000000 54 | Size.Width = 366.000000000000000000 55 | Size.Height = 64.000000000000000000 56 | Size.PlatformDefault = False 57 | Stroke.Kind = None 58 | object txtCnDate1: TText 59 | Position.X = 8.000000000000000000 60 | Position.Y = 8.000000000000000000 61 | Size.Width = 200.000000000000000000 62 | Size.Height = 25.000000000000000000 63 | Size.PlatformDefault = False 64 | Text = #20892#21382#19971#26376#24319#20108 65 | TextSettings.Font.Size = 16.000000000000000000 66 | TextSettings.HorzAlign = Leading 67 | object txtCnDate2: TText 68 | Position.Y = 24.000000000000000000 69 | Size.Width = 200.000000000000000000 70 | Size.Height = 25.000000000000000000 71 | Size.PlatformDefault = False 72 | Text = #19969#37193#40481#24180' '#20057#37193#26376' '#22764#23493#26085 73 | TextSettings.FontColor = claGray 74 | TextSettings.HorzAlign = Leading 75 | end 76 | end 77 | end 78 | end 79 | object Layout1: TLayout 80 | Align = Top 81 | Size.Width = 366.000000000000000000 82 | Size.Height = 44.000000000000000000 83 | Size.PlatformDefault = False 84 | TabOrder = 2 85 | object rbChinese: TRadioButton 86 | GroupName = 'Lang' 87 | IsChecked = True 88 | Position.X = 16.000000000000000000 89 | Position.Y = 13.000000000000000000 90 | Size.Width = 112.000000000000000000 91 | Size.Height = 19.000000000000000000 92 | Size.PlatformDefault = False 93 | TabOrder = 2 94 | Text = #27721#35821 95 | OnChange = rbChineseChange 96 | end 97 | object rbEnglish: TRadioButton 98 | GroupName = 'Lang' 99 | Position.X = 132.000000000000000000 100 | Position.Y = 13.000000000000000000 101 | Size.Width = 112.000000000000000000 102 | Size.Height = 19.000000000000000000 103 | Size.PlatformDefault = False 104 | TabOrder = 1 105 | Text = 'English' 106 | OnChange = rbChineseChange 107 | end 108 | object rbSpanish: TRadioButton 109 | GroupName = 'Lang' 110 | Position.X = 248.000000000000000000 111 | Position.Y = 13.000000000000000000 112 | Size.Width = 112.000000000000000000 113 | Size.Height = 19.000000000000000000 114 | Size.PlatformDefault = False 115 | TabOrder = 0 116 | Text = 'Espa'#241'ol' 117 | OnChange = rbChineseChange 118 | end 119 | end 120 | object lng1: TLang 121 | Lang = 'zh' 122 | Left = 168 123 | Top = 224 124 | ResourcesBin = { 125 | 2F00000033000D000A0035000D000A0034000D000A003E663A799C5186530D00 126 | 0A00496CED8B0D000A007F89ED735972ED8B0D000A0045006E0067006C006900 127 | 730068000D000A004500730070006100F1006F006C000D000A00F182ED8B0D00 128 | 0A0003000000020000007A0068004E0000003E663A799C5186533D003E663A79 129 | 9C5186530D000A00496CED8B3D00496CED8B0D000A0045006E0067006C006900 130 | 730068003D0045006E0067006C006900730068000D000A004500730070006100 131 | F1006F006C003D004500730070006100F1006F006C000D000A00F182ED8B3D00 132 | 45006E0067006C006900730068000D000A007F89ED735972ED8B3D0045007300 133 | 70006100F1006F006C000D000A000200000065006E00540000003E663A799C51 134 | 86533D00530068006F00770020004C0075006E00610072000D000A00F182ED8B 135 | 3D0045006E0067006C006900730068000D000A007F89ED735972ED8B3D004500 136 | 730070006100F1006F006C000D000A0045006E0067006C006900730068003D00 137 | 45006E0067006C006900730068000D000A004500730070006100F1006F006C00 138 | 3D004500730070006100F1006F006C000D000A00496CED8B3D00496CED8B0D00 139 | 0A000200000065007300570000003E663A799C5186533D004D006F0073007400 140 | 72006100720020004C0075006E00610072000D000A00496CED8B3D00496CED8B 141 | 0D000A00F182ED8B3D0045006E0067006C006900730068000D000A007F89ED73 142 | 5972ED8B3D004500730070006100F1006F006C000D000A004500730070006100 143 | F1006F006C003D004500730070006100F1006F006C000D000A0045006E006700 144 | 6C006900730068003D0045006E0067006C006900730068000D000A00} 145 | end 146 | end 147 | -------------------------------------------------------------------------------- /Demo/CalendarDemo/CalendarDemoMain.pas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhaoyipeng/FMXComponents/f7d75d6776040f68c840c1724ce694bcf911979d/Demo/CalendarDemo/CalendarDemoMain.pas -------------------------------------------------------------------------------- /Demo/Entitlement.TemplateOSX32.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | <%appSandboxKeys%> 6 | 7 | 8 | -------------------------------------------------------------------------------- /Demo/FMXComponentsDemo.dpr: -------------------------------------------------------------------------------- 1 | program FMXComponentsDemo; 2 | 3 | uses 4 | System.StartUpCopy, 5 | FMX.Forms, 6 | FMXComponentsDemoMain in 'FMXComponentsDemoMain.pas' {FMXComponentsDemoForm}, 7 | ONE.Objects in 'ONE.Objects.pas'; 8 | 9 | {$R *.res} 10 | 11 | begin 12 | Application.Initialize; 13 | Application.CreateForm(TFMXComponentsDemoForm, FMXComponentsDemoForm); 14 | Application.Run; 15 | end. 16 | -------------------------------------------------------------------------------- /Demo/FMXComponentsDemo.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhaoyipeng/FMXComponents/f7d75d6776040f68c840c1724ce694bcf911979d/Demo/FMXComponentsDemo.res -------------------------------------------------------------------------------- /Demo/FMXComponentsDemoMain.pas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhaoyipeng/FMXComponents/f7d75d6776040f68c840c1724ce694bcf911979d/Demo/FMXComponentsDemoMain.pas -------------------------------------------------------------------------------- /Demo/FMXGR32DemoMain.pas: -------------------------------------------------------------------------------- 1 | unit FMXGR32DemoMain; 2 | 3 | interface 4 | 5 | uses 6 | System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants, 7 | FMX.Types, FMX.Controls, FMX.Forms, FMX.Graphics, FMX.Dialogs, FMX.Objects, 8 | FMX.Controls.Presentation, FMX.StdCtrls, System.Math.Vectors, 9 | GR32_Transforms, GR32, System.Math, FMX.Layouts, TypInfo, 10 | FMX.Platform, FMX.ListBox, GR32_Resamplers; 11 | 12 | type 13 | TFMXGR32DemoMainFrom = class(TForm) 14 | Image1: TImage; 15 | Layout2: TLayout; 16 | Image2: TImage; 17 | Rectangle3: TRectangle; 18 | Label13: TLabel; 19 | Rectangle1: TRectangle; 20 | Label1: TLabel; 21 | CmbResamplerClassNames: TComboBox; 22 | procedure FormCreate(Sender: TObject); 23 | procedure Layout2Resize(Sender: TObject); 24 | procedure CmbResamplerClassNamesChange(Sender: TObject); 25 | private const 26 | DESIRE_FORMAT: TPixelFormat = 27 | {$IFDEF ANDROID} 28 | TPixelFormat.RGBA 29 | {$ELSE} 30 | TPixelFormat.BGRA 31 | {$ENDIF} 32 | ; 33 | private 34 | { Private declarations } 35 | Transformation: TProjectiveTransformation; 36 | FScaleFactor: Single; 37 | Vertices: array [0..3] of TPointF; 38 | procedure DoPointChanged(Sender: TObject; var X, Y: Single); 39 | procedure DoTransform; 40 | public 41 | { Public declarations } 42 | end; 43 | 44 | var 45 | FMXGR32DemoMainFrom: TFMXGR32DemoMainFrom; 46 | 47 | implementation 48 | {$R *.fmx} 49 | 50 | procedure TFMXGR32DemoMainFrom.CmbResamplerClassNamesChange(Sender: TObject); 51 | begin 52 | DoTransform; 53 | end; 54 | 55 | procedure TFMXGR32DemoMainFrom.DoPointChanged(Sender: TObject; var X, Y: Single); 56 | var 57 | idx: Integer; 58 | begin 59 | idx := (Sender as TComponent).Tag; 60 | Vertices[idx].X := X; 61 | Vertices[idx].Y := Y; 62 | DoTransform; 63 | end; 64 | 65 | procedure TFMXGR32DemoMainFrom.DoTransform; 66 | var 67 | src, dst: TBitmap32; 68 | maxx,maxy: Single; 69 | I: Integer; 70 | s: string; 71 | dstBitmap, tmp: TBitmap; 72 | begin 73 | if image1.Bitmap.PixelFormat <> DESIRE_FORMAT then 74 | begin 75 | s := TypInfo.GetEnumName(TypeInfo(TPixelFormat), Integer(image1.Bitmap.PixelFormat)); 76 | ShowMessage('wrong with ' + s); 77 | Exit; 78 | end; 79 | 80 | maxx := 0; 81 | maxy := 0; 82 | for I := 0 to 3 do 83 | begin 84 | maxx := max(maxx, Vertices[I].X); 85 | maxy := max(maxy, Vertices[I].Y); 86 | end; 87 | 88 | Transformation.X0 := Vertices[0].X; 89 | Transformation.Y0 := Vertices[0].Y; 90 | Transformation.X1 := Vertices[1].X; 91 | Transformation.Y1 := Vertices[1].Y; 92 | Transformation.X2 := Vertices[2].X; 93 | Transformation.Y2 := Vertices[2].Y; 94 | Transformation.X3 := Vertices[3].X; 95 | Transformation.Y3 := Vertices[3].Y; 96 | Transformation.SrcRect := FloatRect(0,0,200,200); 97 | src := TBitmap32.Create(); 98 | dst := TBitmap32.Create(); 99 | dstBitmap := TBitmap.Create; 100 | try 101 | src.Assign(Image1.Bitmap); 102 | with CmbResamplerClassNames do 103 | if ItemIndex >= 0 then 104 | Src.ResamplerClassName := Items[ ItemIndex ]; 105 | dst.SetSize(ceil(maxx), ceil(maxy)); 106 | Dst.Clear($00000000); 107 | Transform(Dst, Src, Transformation); 108 | dstBitmap.Assign(dst); 109 | if FScaleFactor = 1 then 110 | Image2.Bitmap := dstBitmap 111 | else 112 | begin 113 | tmp := TBitmap.Create; 114 | try 115 | tmp.SetSize(Round(dstBitmap.Width * FScaleFactor), Round(dstBitmap.Height * FScaleFactor)); 116 | tmp.Canvas.BeginScene; 117 | tmp.Clear(0); 118 | tmp.Canvas.DrawBitmap(dstBitmap, dstBitmap.Bounds, tmp.Bounds, 1); 119 | tmp.Canvas.EndScene; 120 | Image2.Bitmap := tmp; 121 | finally 122 | tmp.Free; 123 | end; 124 | end; 125 | finally 126 | dstBitmap.Free; 127 | dst.Free; 128 | src.Free; 129 | end; 130 | end; 131 | 132 | procedure TFMXGR32DemoMainFrom.FormCreate(Sender: TObject); 133 | var 134 | I: Integer; 135 | Shape: TSelectionPoint; 136 | ScreenSrv: IFMXScreenService; 137 | begin 138 | 139 | if TPlatformServices.Current.SupportsPlatformService(IFMXScreenService, ScreenSrv) then 140 | FScaleFactor := ScreenSrv.GetScreenScale 141 | else 142 | FScaleFactor := 1; 143 | 144 | Transformation := TProjectiveTransformation.Create; 145 | Vertices[0] := Point(0,0); 146 | Vertices[1] := Point(200,0); 147 | Vertices[2] := Point(200,200); 148 | Vertices[3] := Point(0,200); 149 | for I := 0 to 3 do 150 | begin 151 | Shape := TSelectionPoint.Create(Self); 152 | Shape.Parent := Image2; 153 | Shape.GripSize := 9; 154 | Shape.Position.X := Vertices[i].X; 155 | Shape.Position.Y := Vertices[i].Y; 156 | Shape.OnTrack := DoPointChanged; 157 | Shape.Tag := i; 158 | end; 159 | ResamplerList.GetClassNames(CmbResamplerClassNames.Items); 160 | CmbResamplerClassNames.ItemIndex := 0; 161 | end; 162 | 163 | procedure TFMXGR32DemoMainFrom.Layout2Resize(Sender: TObject); 164 | begin 165 | Image1.Position.Point := TPoint.Zero; 166 | if Layout2.Width > Layout2.Height then 167 | begin 168 | Image1.Size.Size := TSizeF.Create(Layout2.Width / 2, Layout2.Height); 169 | Image2.Position.Point := PointF(Layout2.Width/2, 0); 170 | Image2.Size.Size := TSizeF.Create(Layout2.Width / 2, Layout2.Height); 171 | end 172 | else 173 | begin 174 | Image1.Size.Size := TSizeF.Create(Layout2.Width, Layout2.Height/2); 175 | Image2.Position.Point := PointF(0, Layout2.Height/2); 176 | Image2.Size.Size := TSizeF.Create(Layout2.Width, Layout2.Height/2); 177 | end; 178 | end; 179 | 180 | end. 181 | -------------------------------------------------------------------------------- /Demo/FMXGR32DemoProj.dpr: -------------------------------------------------------------------------------- 1 | program FMXGR32DemoProj; 2 | 3 | uses 4 | System.StartUpCopy, 5 | FMX.Forms, 6 | FMXGR32DemoMain in 'FMXGR32DemoMain.pas' {FMXGR32DemoMainFrom}; 7 | 8 | {$R *.res} 9 | 10 | begin 11 | Application.Initialize; 12 | Application.CreateForm(TFMXGR32DemoMainFrom, FMXGR32DemoMainFrom); 13 | Application.Run; 14 | end. 15 | -------------------------------------------------------------------------------- /Demo/ImageSliderDemo/.gitignore: -------------------------------------------------------------------------------- 1 | /Win32 2 | /__history 3 | /ImageSliderDemo.res 4 | /Android 5 | /Win64 6 | -------------------------------------------------------------------------------- /Demo/ImageSliderDemo/AndroidManifest.template.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | 10 | 11 | <%uses-permission%> 12 | 13 | 21 | 22 | <%application-meta-data%> 23 | <%services%> 24 | 26 | 30 | 31 | 33 | 34 | 35 | 36 | 37 | 38 | <%activity%> 39 | <%receivers%> 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /Demo/ImageSliderDemo/ImageSliderDemo.dpr: -------------------------------------------------------------------------------- 1 | program ImageSliderDemo; 2 | 3 | uses 4 | System.StartUpCopy, 5 | FMX.Forms, 6 | frmMainU in 'frmMainU.pas' {frmMain}, 7 | FMX.ImageSlider in '..\..\ComponentsSource\FMX.ImageSlider.pas'; 8 | 9 | {$R *.res} 10 | 11 | begin 12 | Application.Initialize; 13 | Application.CreateForm(TfrmMain, frmMain); 14 | Application.Run; 15 | end. 16 | -------------------------------------------------------------------------------- /Demo/ImageSliderDemo/Images/Image1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhaoyipeng/FMXComponents/f7d75d6776040f68c840c1724ce694bcf911979d/Demo/ImageSliderDemo/Images/Image1.jpg -------------------------------------------------------------------------------- /Demo/ImageSliderDemo/Images/image2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhaoyipeng/FMXComponents/f7d75d6776040f68c840c1724ce694bcf911979d/Demo/ImageSliderDemo/Images/image2.jpg -------------------------------------------------------------------------------- /Demo/ImageSliderDemo/Images/image3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhaoyipeng/FMXComponents/f7d75d6776040f68c840c1724ce694bcf911979d/Demo/ImageSliderDemo/Images/image3.jpg -------------------------------------------------------------------------------- /Demo/ImageSliderDemo/Images/image4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhaoyipeng/FMXComponents/f7d75d6776040f68c840c1724ce694bcf911979d/Demo/ImageSliderDemo/Images/image4.jpg -------------------------------------------------------------------------------- /Demo/ImageSliderDemo/frmMainU.fmx: -------------------------------------------------------------------------------- 1 | object frmMain: TfrmMain 2 | Left = 0 3 | Top = 0 4 | Caption = 'TFMXImageSlider Demo' 5 | ClientHeight = 629 6 | ClientWidth = 338 7 | FormFactor.Width = 320 8 | FormFactor.Height = 480 9 | FormFactor.Devices = [Desktop] 10 | OnCreate = FormCreate 11 | OnResize = FormResize 12 | DesignerMasterStyle = 0 13 | object ToolBar: TLayout 14 | Align = Bottom 15 | Position.Y = 457.000000000000000000 16 | Size.Width = 338.000000000000000000 17 | Size.Height = 40.000000000000000000 18 | Size.PlatformDefault = False 19 | TabOrder = 0 20 | object btnAdd: TButton 21 | Align = Left 22 | Margins.Left = 4.000000000000000000 23 | Margins.Top = 4.000000000000000000 24 | Margins.Right = 4.000000000000000000 25 | Margins.Bottom = 4.000000000000000000 26 | Position.X = 4.000000000000000000 27 | Position.Y = 4.000000000000000000 28 | Size.Width = 105.000000000000000000 29 | Size.Height = 32.000000000000000000 30 | Size.PlatformDefault = False 31 | TabOrder = 0 32 | Text = 'Add' 33 | OnClick = btnAddClick 34 | end 35 | object btnGoPage: TButton 36 | Align = Left 37 | Margins.Left = 4.000000000000000000 38 | Margins.Top = 4.000000000000000000 39 | Margins.Right = 4.000000000000000000 40 | Margins.Bottom = 4.000000000000000000 41 | Position.X = 225.000000000000000000 42 | Position.Y = 4.000000000000000000 43 | Size.Width = 80.000000000000000000 44 | Size.Height = 32.000000000000000000 45 | Size.PlatformDefault = False 46 | TabOrder = 3 47 | Text = 'Move Page' 48 | OnClick = btnGoPageClick 49 | end 50 | object Page: TEdit 51 | Touch.InteractiveGestures = [LongTap, DoubleTap] 52 | Align = Left 53 | TabOrder = 4 54 | Text = '1' 55 | Position.X = 117.000000000000000000 56 | Position.Y = 4.000000000000000000 57 | Margins.Left = 4.000000000000000000 58 | Margins.Top = 4.000000000000000000 59 | Margins.Right = 4.000000000000000000 60 | Margins.Bottom = 4.000000000000000000 61 | Size.Width = 100.000000000000000000 62 | Size.Height = 32.000000000000000000 63 | Size.PlatformDefault = False 64 | end 65 | end 66 | object OpenDialog: TOpenDialog 67 | Filter = #51060#48120#51648#54028#51068'|*.jpg;*.png' 68 | Left = 64 69 | Top = 64 70 | end 71 | object Layout1: TLayout 72 | Align = Bottom 73 | Position.Y = 497.000000000000000000 74 | Size.Width = 338.000000000000000000 75 | Size.Height = 44.000000000000000000 76 | Size.PlatformDefault = False 77 | TabOrder = 5 78 | object IsAuto: TCheckBox 79 | Align = Left 80 | Size.Width = 121.000000000000000000 81 | Size.Height = 44.000000000000000000 82 | Size.PlatformDefault = False 83 | TabOrder = 7 84 | Text = 'Auto Slider' 85 | OnChange = IsAutoChange 86 | end 87 | object chkShowDots: TCheckBox 88 | Align = Left 89 | IsChecked = True 90 | Position.X = 121.000000000000000000 91 | Size.Width = 121.000000000000000000 92 | Size.Height = 44.000000000000000000 93 | Size.PlatformDefault = False 94 | TabOrder = 6 95 | Text = 'Show Dots' 96 | OnChange = chkShowDotsChange 97 | end 98 | end 99 | object Layout2: TLayout 100 | Align = Bottom 101 | Position.Y = 585.000000000000000000 102 | Size.Width = 338.000000000000000000 103 | Size.Height = 44.000000000000000000 104 | Size.PlatformDefault = False 105 | TabOrder = 3 106 | object Button1: TButton 107 | Align = Left 108 | Margins.Left = 4.000000000000000000 109 | Margins.Top = 4.000000000000000000 110 | Margins.Right = 4.000000000000000000 111 | Margins.Bottom = 4.000000000000000000 112 | Position.X = 4.000000000000000000 113 | Position.Y = 4.000000000000000000 114 | Size.Width = 80.000000000000000000 115 | Size.Height = 36.000000000000000000 116 | Size.PlatformDefault = False 117 | TabOrder = 6 118 | Text = 'Clear' 119 | OnClick = btnInitClick 120 | end 121 | object SpeedButton1: TSpeedButton 122 | Align = Right 123 | Position.X = 238.000000000000000000 124 | Size.Width = 50.000000000000000000 125 | Size.Height = 44.000000000000000000 126 | Size.PlatformDefault = False 127 | StyleLookup = 'arrowlefttoolbutton' 128 | Text = 'btnPrev' 129 | OnClick = btnPrevClick 130 | end 131 | object SpeedButton2: TSpeedButton 132 | Align = Right 133 | Position.X = 288.000000000000000000 134 | Size.Width = 50.000000000000000000 135 | Size.Height = 44.000000000000000000 136 | Size.PlatformDefault = False 137 | StyleLookup = 'arrowrighttoolbutton' 138 | Text = 'btnNext' 139 | OnClick = btnNextClick 140 | end 141 | end 142 | object Memo1: TMemo 143 | Touch.InteractiveGestures = [Pan, LongTap, DoubleTap] 144 | DataDetectorTypes = [] 145 | Align = Client 146 | Size.Width = 338.000000000000000000 147 | Size.Height = 164.000000000000000000 148 | Size.PlatformDefault = False 149 | TabOrder = 8 150 | Viewport.Width = 334.000000000000000000 151 | Viewport.Height = 160.000000000000000000 152 | end 153 | object ImgSlider: TFMXImageSlider 154 | Align = Top 155 | HitTest = True 156 | Size.Width = 338.000000000000000000 157 | Size.Height = 161.000000000000000000 158 | Size.PlatformDefault = False 159 | TabOrder = 10 160 | ActivePage = -1 161 | AnimateDuration = 0.200000002980232200 162 | AutoSlider = False 163 | PageCount = 0 164 | TimerInterval = 5000 165 | OnCanDragBegin = ImgSliderCanDragBegin 166 | OnItemClick = ImgSliderItemClick 167 | OnItemTap = ImgSliderItemTap 168 | OnPageChange = ImgSliderPageChange 169 | OnPageAnimationFinish = ImgSliderPageAnimationFinish 170 | end 171 | object Layout3: TLayout 172 | Align = Bottom 173 | Position.Y = 541.000000000000000000 174 | Size.Width = 338.000000000000000000 175 | Size.Height = 44.000000000000000000 176 | Size.PlatformDefault = False 177 | TabOrder = 4 178 | object Label2: TLabel 179 | Align = Left 180 | Margins.Left = 4.000000000000000000 181 | Margins.Top = 4.000000000000000000 182 | Margins.Right = 4.000000000000000000 183 | Margins.Bottom = 4.000000000000000000 184 | Position.X = 4.000000000000000000 185 | Position.Y = 4.000000000000000000 186 | Size.Width = 120.000000000000000000 187 | Size.Height = 36.000000000000000000 188 | Size.PlatformDefault = False 189 | Text = 'Interval:' 190 | TabOrder = 6 191 | end 192 | object cbbInterval: TComboBox 193 | Align = VertCenter 194 | Items.Strings = ( 195 | '1s' 196 | '2s' 197 | '3s' 198 | '4s' 199 | '5s') 200 | ItemIndex = 4 201 | Margins.Left = 4.000000000000000000 202 | Margins.Top = 4.000000000000000000 203 | Margins.Right = 4.000000000000000000 204 | Margins.Bottom = 4.000000000000000000 205 | Position.X = 132.000000000000000000 206 | Position.Y = 4.000000000000000000 207 | Size.Width = 202.000000000000000000 208 | Size.Height = 36.000000000000000000 209 | Size.PlatformDefault = False 210 | TabOrder = 7 211 | OnChange = cbbIntervalChange 212 | end 213 | end 214 | object Layout4: TLayout 215 | Align = Bottom 216 | Position.Y = 325.000000000000000000 217 | Size.Width = 338.000000000000000000 218 | Size.Height = 132.000000000000000000 219 | Size.PlatformDefault = False 220 | TabOrder = 12 221 | OnResize = Layout4Resize 222 | object cpActiveColor: TColorPanel 223 | Align = Left 224 | Color = claWhite 225 | Size.Width = 150.000000000000000000 226 | Size.Height = 132.000000000000000000 227 | Size.PlatformDefault = False 228 | TabOrder = 1 229 | OnChange = cpActiveColorChange 230 | end 231 | object cpInactiveColor: TColorPanel 232 | Align = Left 233 | Color = claWhite 234 | Position.X = 150.000000000000000000 235 | Size.Width = 150.000000000000000000 236 | Size.Height = 132.000000000000000000 237 | Size.PlatformDefault = False 238 | TabOrder = 0 239 | OnChange = cpInactiveColorChange 240 | end 241 | end 242 | end 243 | -------------------------------------------------------------------------------- /Demo/ImageSliderDemo/frmMainU.pas: -------------------------------------------------------------------------------- 1 | unit frmMainU; 2 | 3 | interface 4 | 5 | uses 6 | System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants, 7 | FMX.Types, FMX.Controls, FMX.Forms, FMX.Graphics, FMX.Dialogs, FMX.Objects, 8 | FMX.StdCtrls, FMX.Edit, FMX.Controls.Presentation, FMX.ImageSlider, 9 | FMX.Layouts, FMX.ListBox, FMX.ScrollBox, FMX.Memo, FMX.Colors; 10 | 11 | type 12 | TfrmMain = class(TForm) 13 | ToolBar: TLayout; 14 | btnAdd: TButton; 15 | btnGoPage: TButton; 16 | Page: TEdit; 17 | OpenDialog: TOpenDialog; 18 | Layout1: TLayout; 19 | Layout2: TLayout; 20 | Button1: TButton; 21 | SpeedButton1: TSpeedButton; 22 | SpeedButton2: TSpeedButton; 23 | Memo1: TMemo; 24 | ImgSlider: TFMXImageSlider; 25 | Layout3: TLayout; 26 | Label2: TLabel; 27 | cbbInterval: TComboBox; 28 | IsAuto: TCheckBox; 29 | chkShowDots: TCheckBox; 30 | Layout4: TLayout; 31 | cpActiveColor: TColorPanel; 32 | cpInactiveColor: TColorPanel; 33 | procedure btnAddClick(Sender: TObject); 34 | procedure btnGoPageClick(Sender: TObject); 35 | procedure IsAutoChange(Sender: TObject); 36 | procedure btnInitClick(Sender: TObject); 37 | procedure btnPrevClick(Sender: TObject); 38 | procedure btnNextClick(Sender: TObject); 39 | procedure FormCreate(Sender: TObject); 40 | procedure cbbIntervalChange(Sender: TObject); 41 | procedure ImgSliderItemClick(Sender: TObject); 42 | procedure ImgSliderItemTap(Sender: TObject; const Point: TPointF); 43 | procedure ImgSliderCanDragBegin(Sender: TObject; var CanBegin: Boolean); 44 | procedure ImgSliderPageAnimationFinish(Sender: TObject; NewPage: Integer); 45 | procedure ImgSliderPageChange(Sender: TObject; NewPage, OldPage: Integer); 46 | procedure chkShowDotsChange(Sender: TObject); 47 | procedure Layout4Resize(Sender: TObject); 48 | procedure cpActiveColorChange(Sender: TObject); 49 | procedure cpInactiveColorChange(Sender: TObject); 50 | procedure FormResize(Sender: TObject); 51 | private 52 | procedure AddBitmap(const FileName: string); 53 | { Private declarations } 54 | public 55 | { Public declarations } 56 | end; 57 | 58 | var 59 | frmMain: TfrmMain; 60 | 61 | implementation 62 | 63 | uses 64 | System.IOUtils; 65 | 66 | {$R *.fmx} 67 | 68 | procedure TfrmMain.btnAddClick(Sender: TObject); 69 | begin 70 | if OpenDialog.Execute then 71 | begin 72 | AddBitmap(OpenDialog.FileName); 73 | end; 74 | end; 75 | 76 | procedure TfrmMain.btnGoPageClick(Sender: TObject); 77 | begin 78 | ImgSlider.ActivePage := StrToInt(Page.Text.Trim); 79 | end; 80 | 81 | procedure TfrmMain.btnInitClick(Sender: TObject); 82 | begin 83 | ImgSlider.Clear; 84 | end; 85 | 86 | procedure TfrmMain.btnNextClick(Sender: TObject); 87 | begin 88 | ImgSlider.Next; 89 | end; 90 | 91 | procedure TfrmMain.btnPrevClick(Sender: TObject); 92 | begin 93 | ImgSlider.Prev; 94 | end; 95 | 96 | procedure TfrmMain.cbbIntervalChange(Sender: TObject); 97 | const 98 | INTERVALS: array [0..4] of Integer = ( 99 | 1000, 2000, 3000, 4000, 5000 100 | ); 101 | begin 102 | ImgSlider.TimerInterval := INTERVALS[cbbInterval.ItemIndex]; 103 | end; 104 | 105 | procedure TfrmMain.chkShowDotsChange(Sender: TObject); 106 | begin 107 | ImgSlider.DotsVisible := chkShowDots.IsChecked; 108 | end; 109 | 110 | procedure TfrmMain.cpActiveColorChange(Sender: TObject); 111 | begin 112 | ImgSlider.DotActiveColor := cpActiveColor.Color; 113 | end; 114 | 115 | procedure TfrmMain.cpInactiveColorChange(Sender: TObject); 116 | begin 117 | ImgSlider.DotInActiveColor := cpInactiveColor.Color; 118 | end; 119 | 120 | procedure TfrmMain.FormCreate(Sender: TObject); 121 | begin 122 | ImgSlider.Height:= ClientWidth * 400 / 640; 123 | {$IFDEF MSWINDOWS} 124 | AddBitmap('..\..\Images\image1.jpg'); 125 | AddBitmap('..\..\Images\image2.jpg'); 126 | AddBitmap('..\..\Images\image3.jpg'); 127 | AddBitmap('..\..\Images\image4.jpg'); 128 | ImgSlider.ActivePage := 0; 129 | {$ENDIF} 130 | {$IFDEF ANDROID} 131 | AddBitmap('images/image1.jpg'); 132 | AddBitmap('images/image2.jpg'); 133 | AddBitmap('images/image3.jpg'); 134 | AddBitmap('images/image4.jpg'); 135 | ImgSlider.ActivePage := 0; 136 | {$ENDIF} 137 | cpActiveColor.Color := ImgSlider.DotActiveColor; 138 | cpInActiveColor.Color := ImgSlider.DotInActiveColor; 139 | end; 140 | 141 | procedure TfrmMain.FormResize(Sender: TObject); 142 | begin 143 | ImgSlider.Height:= ClientWidth * 400 / 640; 144 | end; 145 | 146 | procedure TfrmMain.ImgSliderCanDragBegin(Sender: TObject; 147 | var CanBegin: Boolean); 148 | begin 149 | // Memo1.Lines.Add('On CanDragBegin'); 150 | end; 151 | 152 | procedure TfrmMain.ImgSliderItemClick(Sender: TObject); 153 | begin 154 | // Memo1.Lines.Add('On Item Click: '+ TControl(Sender).Tag.ToString); 155 | end; 156 | 157 | procedure TfrmMain.ImgSliderItemTap(Sender: TObject; const Point: TPointF); 158 | begin 159 | // Memo1.Lines.Add('On Item Tap: '+ TControl(Sender).Tag.ToString); 160 | end; 161 | 162 | procedure TfrmMain.ImgSliderPageAnimationFinish(Sender: TObject; NewPage: Integer); 163 | begin 164 | // Memo1.Lines.Add( 165 | // Format('On PageAnimationFinish, NewPage: %d, OldPage: %d', 166 | // [NewPage, OldPage])); 167 | end; 168 | 169 | procedure TfrmMain.ImgSliderPageChange(Sender: TObject; NewPage, 170 | OldPage: Integer); 171 | begin 172 | Memo1.Lines.Add( 173 | Format('On PageChange, OldPage: %d, NewPage: %d', 174 | [OldPage, NewPage])); 175 | end; 176 | 177 | procedure TfrmMain.AddBitmap(const FileName: string); 178 | var 179 | Bmp: TBitmap; 180 | p: string; 181 | begin 182 | Bmp := TBitmap.Create; 183 | try 184 | {$IFDEF ANDROID} 185 | p := TPath.Combine(System.IOUtils.TPath.GetDocumentsPath, FileName); 186 | {$ELSE} 187 | p := FileName; 188 | {$ENDIF} 189 | Bmp.LoadFromFile(p); 190 | ImgSlider.Add((ImgSlider.PageCount + 1).ToString, Bmp); 191 | finally 192 | Bmp.Free; 193 | end; 194 | end; 195 | 196 | procedure TfrmMain.IsAutoChange(Sender: TObject); 197 | begin 198 | ImgSlider.AutoSlider := IsAuto.IsChecked; 199 | end; 200 | 201 | procedure TfrmMain.Layout4Resize(Sender: TObject); 202 | begin 203 | cpActiveColor.Width := Layout4.Width / 2; 204 | cpInactiveColor.Width := Layout4.Width / 2; 205 | end; 206 | 207 | end. 208 | -------------------------------------------------------------------------------- /Demo/LoadingIndicatiorDemoMain.pas: -------------------------------------------------------------------------------- 1 | unit LoadingIndicatiorDemoMain; 2 | 3 | interface 4 | 5 | uses 6 | System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants, 7 | FMX.Types, FMX.Controls, FMX.Forms, FMX.Graphics, FMX.Dialogs, 8 | FMX.Controls.Presentation, FMX.StdCtrls, FMX.Layouts, FMX.LoadingIndicator, 9 | FMX.Objects, FMX.Ani, FMX.Utils, FMX.BezierAnimation; 10 | 11 | type 12 | TLoadingIndicatorDemoForm = class(TForm) 13 | GridPanelLayout1: TGridPanelLayout; 14 | Layout1: TLayout; 15 | Rectangle1: TRectangle; 16 | Rectangle3: TRectangle; 17 | Label13: TLabel; 18 | rect1: TRectangle; 19 | Rectangle2: TRectangle; 20 | Label1: TLabel; 21 | Rectangle4: TRectangle; 22 | Rectangle5: TRectangle; 23 | GridPanelLayout2: TGridPanelLayout; 24 | FMXLoadingIndicator6: TFMXLoadingIndicator; 25 | FMXLoadingIndicator7: TFMXLoadingIndicator; 26 | FMXLoadingIndicator8: TFMXLoadingIndicator; 27 | FMXLoadingIndicator3: TFMXLoadingIndicator; 28 | FMXLoadingIndicator2: TFMXLoadingIndicator; 29 | FMXLoadingIndicator1: TFMXLoadingIndicator; 30 | FMXLoadingIndicator4: TFMXLoadingIndicator; 31 | FMXLoadingIndicator9: TFMXLoadingIndicator; 32 | Rectangle6: TRectangle; 33 | Rectangle7: TRectangle; 34 | Button1: TButton; 35 | FloatAnimation1: TFloatAnimation; 36 | FMXLoadingIndicator10: TFMXLoadingIndicator; 37 | FMXLoadingIndicator11: TFMXLoadingIndicator; 38 | FMXLoadingIndicator13: TFMXLoadingIndicator; 39 | FMXLoadingIndicator16: TFMXLoadingIndicator; 40 | FMXLoadingIndicator17: TFMXLoadingIndicator; 41 | FMXLoadingIndicator19: TFMXLoadingIndicator; 42 | FMXLoadingIndicator21: TFMXLoadingIndicator; 43 | FMXLoadingIndicator23: TFMXLoadingIndicator; 44 | FMXLoadingIndicator5: TFMXLoadingIndicator; 45 | FMXLoadingIndicator12: TFMXLoadingIndicator; 46 | FMXLoadingIndicator14: TFMXLoadingIndicator; 47 | FMXLoadingIndicator15: TFMXLoadingIndicator; 48 | FMXLoadingIndicator18: TFMXLoadingIndicator; 49 | FMXLoadingIndicator20: TFMXLoadingIndicator; 50 | FMXLoadingIndicator22: TFMXLoadingIndicator; 51 | FMXLoadingIndicator24: TFMXLoadingIndicator; 52 | FMXLoadingIndicator25: TFMXLoadingIndicator; 53 | FMXLoadingIndicator26: TFMXLoadingIndicator; 54 | FMXLoadingIndicator27: TFMXLoadingIndicator; 55 | FMXLoadingIndicator28: TFMXLoadingIndicator; 56 | FMXLoadingIndicator29: TFMXLoadingIndicator; 57 | procedure Button1Click(Sender: TObject); 58 | procedure FormCreate(Sender: TObject); 59 | procedure FormDestroy(Sender: TObject); 60 | procedure FloatAnimation1Process(Sender: TObject); 61 | procedure PaintBox1Paint(Sender: TObject; Canvas: TCanvas); 62 | private 63 | { Private declarations } 64 | FBezier: TBezier; 65 | public 66 | { Public declarations } 67 | end; 68 | 69 | var 70 | LoadingIndicatorDemoForm: TLoadingIndicatorDemoForm; 71 | 72 | implementation 73 | 74 | {$R *.fmx} 75 | 76 | procedure TLoadingIndicatorDemoForm.Button1Click(Sender: TObject); 77 | begin 78 | FloatAnimation1.Enabled := not FloatAnimation1.Enabled; 79 | end; 80 | 81 | procedure TLoadingIndicatorDemoForm.FloatAnimation1Process(Sender: TObject); 82 | var 83 | T, T1: Single; 84 | begin 85 | T := FloatAnimation1.NormalizedTime; 86 | T1 := TBezier.GetEaseInOut.Solve(T, 1.0E-5); 87 | Rectangle6.Position.X := InterpolateSingle( 88 | FloatAnimation1.StartValue, FloatAnimation1.StopValue, T1); 89 | end; 90 | 91 | procedure TLoadingIndicatorDemoForm.FormCreate(Sender: TObject); 92 | begin 93 | // FBezier := TBezier.Create(0.09,0.57,0.49,0.9); 94 | FBezier := TBezier.Create(0.42,0,0.58,1); 95 | end; 96 | 97 | procedure TLoadingIndicatorDemoForm.FormDestroy(Sender: TObject); 98 | begin 99 | FBezier.Free; 100 | end; 101 | 102 | procedure TLoadingIndicatorDemoForm.PaintBox1Paint(Sender: TObject; 103 | Canvas: TCanvas); 104 | //var 105 | // p: TPathData; 106 | // P0, P1, P2, P3: TPointF; 107 | begin 108 | // p := TPathData.Create; 109 | // P0 := PointF(0,0); 110 | // P1 := PointF(9, 57); 111 | // P2 := PointF(49,90); 112 | // P3 := PointF(100,100); 113 | // p.MoveTo(P0); 114 | // P.CurveTo(P1, P2, P3); 115 | // PaintBox1.Scale.Y := -1; 116 | // Canvas.Stroke.Kind := TBrushKind.Solid; 117 | // Canvas.Stroke.Color := TAlphaColors.Black; 118 | // Canvas.DrawRect(PaintBox1.LocalRect, 0,0,allcorners, 1, TCornerType.Round); 119 | // Canvas.DrawPath(p, 1); 120 | // Canvas.DrawLine(P0, P3, 1); 121 | // Canvas.DrawLine(P0, P1, 1); 122 | // Canvas.DrawLine(P2, P3, 1); 123 | // p.Free; 124 | end; 125 | 126 | end. 127 | -------------------------------------------------------------------------------- /Demo/LoadingIndicatorDemo.dpr: -------------------------------------------------------------------------------- 1 | program LoadingIndicatorDemo; 2 | 3 | uses 4 | System.StartUpCopy, 5 | FMX.Forms, 6 | FMX.BezierAnimation in '..\ComponentsSource\FMX.BezierAnimation.pas', 7 | FMX.LoadingIndicator in '..\ComponentsSource\FMX.LoadingIndicator.pas', 8 | LoadingIndicatiorDemoMain in 'LoadingIndicatiorDemoMain.pas' {LoadingIndicatorDemoForm}; 9 | 10 | {$R *.res} 11 | 12 | begin 13 | Application.Initialize; 14 | Application.CreateForm(TLoadingIndicatorDemoForm, LoadingIndicatorDemoForm); 15 | Application.Run; 16 | end. 17 | -------------------------------------------------------------------------------- /Demo/ONE.Objects.pas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhaoyipeng/FMXComponents/f7d75d6776040f68c840c1724ce694bcf911979d/Demo/ONE.Objects.pas -------------------------------------------------------------------------------- /Demo/PhotoCorrect/PerspectiveCorrect.pas: -------------------------------------------------------------------------------- 1 | unit PerspectiveCorrect; 2 | 3 | interface 4 | 5 | uses 6 | System.Math, 7 | SimpleSVD, 8 | GR32, 9 | GR32_Transforms, 10 | GR32_Math, 11 | GR32_Blend; 12 | 13 | type 14 | TMyProjectiveTransformation = class(T3x3Transformation) 15 | private 16 | FDestHeight: TFloat; 17 | FDestWidth: TFloat; 18 | FQuadX: array [0..3] of TFloat; 19 | FQuadY: array [0..3] of TFloat; 20 | function GetDestHeight: TFloat; 21 | function GetDestWidth: TFloat; 22 | procedure SetX0(Value: TFloat); {$IFDEF UseInlining} inline; {$ENDIF} 23 | procedure SetX1(Value: TFloat); {$IFDEF UseInlining} inline; {$ENDIF} 24 | procedure SetX2(Value: TFloat); {$IFDEF UseInlining} inline; {$ENDIF} 25 | procedure SetX3(Value: TFloat); {$IFDEF UseInlining} inline; {$ENDIF} 26 | procedure SetY0(Value: TFloat); {$IFDEF UseInlining} inline; {$ENDIF} 27 | procedure SetY1(Value: TFloat); {$IFDEF UseInlining} inline; {$ENDIF} 28 | procedure SetY2(Value: TFloat); {$IFDEF UseInlining} inline; {$ENDIF} 29 | procedure SetY3(Value: TFloat); {$IFDEF UseInlining} inline; {$ENDIF} 30 | protected 31 | procedure PrepareTransform; override; 32 | procedure ReverseTransformFixed(DstX, DstY: TFixed; out SrcX, SrcY: TFixed); override; 33 | procedure ReverseTransformFloat(DstX, DstY: TFloat; out SrcX, SrcY: TFloat); override; 34 | procedure TransformFixed(SrcX, SrcY: TFixed; out DstX, DstY: TFixed); override; 35 | procedure TransformFloat(SrcX, SrcY: TFloat; out DstX, DstY: TFloat); override; 36 | public 37 | function GetTransformedBounds(const ASrcRect: TFloatRect): TFloatRect; override; 38 | property DestWidth: TFloat read GetDestWidth; 39 | property DestHeight: TFloat read GetDestHeight; 40 | published 41 | property X0: TFloat read FQuadX[0] write SetX0; 42 | property X1: TFloat read FQuadX[1] write SetX1; 43 | property X2: TFloat read FQuadX[2] write SetX2; 44 | property X3: TFloat read FQuadX[3] write SetX3; 45 | property Y0: TFloat read FQuadY[0] write SetY0; 46 | property Y1: TFloat read FQuadY[1] write SetY1; 47 | property Y2: TFloat read FQuadY[2] write SetY2; 48 | property Y3: TFloat read FQuadY[3] write SetY3; 49 | end; 50 | 51 | function getPerspectiveTransform(const src, 52 | dst: TArray): TFloatMatrix; 53 | implementation 54 | 55 | function getPerspectiveTransform(const src, 56 | dst: TArray): TFloatMatrix; 57 | const 58 | DECOMP_SVD = 1; 59 | 60 | var 61 | A, b, c: TMatrix; 62 | M, N, i: Integer; 63 | svd_deomposition: TSVD; 64 | A_pinv: TMatrix; 65 | Mat: TFloatMatrix; 66 | begin 67 | M := 8; 68 | N := 8; 69 | A := TMatrix.Create(M, N, 'A', TMatrix.AS_MATRIX); 70 | b := TMatrix.Create(M, 1, 'b', TMatrix.AS_VECTOR); 71 | c := TMatrix.Create(N, 1, 'c', TMatrix.AS_VECTOR); 72 | 73 | for i := 0 to 3 do 74 | begin 75 | A[i,0] := src[i].X; 76 | A[i+4,3] := src[i].X; 77 | A[i,1] := src[i].Y; 78 | a[i+4,4] := src[i].Y; 79 | A[i,2] := 1; 80 | A[i+4,5] := 1; 81 | A[i,3] := 0; 82 | A[i,4] := 0; 83 | A[i,5] := 0; 84 | A[i+4,0] := 0; 85 | A[i+4,1] := 0; 86 | A[i+4,2] := 0; 87 | A[i,6] := -src[i].x*dst[i].x; 88 | A[i,7] := -src[i].y*dst[i].x; 89 | A[i+4,6] := -src[i].x*dst[i].y; 90 | A[i+4,7] := -src[i].y*dst[i].y; 91 | B.Mat[i] := dst[i].x; 92 | B.Mat[i+4] := dst[i].y; 93 | end; 94 | svd_deomposition := TSVD.Create; 95 | A_pinv := nil; 96 | try 97 | A_pinv := svd_deomposition.PinvCompute(A, A.Rows, A.Cols); 98 | svd_deomposition.multiply(A_pinv, b, c); 99 | Mat[0][0] := c.Mat[0]; 100 | Mat[1][0] := c.Mat[1]; 101 | Mat[2][0] := c.Mat[2]; 102 | Mat[0][1] := c.Mat[3]; 103 | Mat[1][1] := c.Mat[4]; 104 | Mat[2][1] := c.Mat[5]; 105 | Mat[0][2] := c.Mat[6]; 106 | Mat[1][2] := c.Mat[7]; 107 | Mat[2][2] := 1; 108 | Result := Mat; 109 | finally 110 | A_pinv.Free; 111 | svd_deomposition.Free; 112 | end; 113 | end; 114 | 115 | { TMyProjectiveTransformation } 116 | 117 | function TMyProjectiveTransformation.GetDestHeight: TFloat; 118 | begin 119 | if not TransformValid then PrepareTransform; 120 | Result := FDestHeight; 121 | end; 122 | 123 | function TMyProjectiveTransformation.GetDestWidth: TFloat; 124 | begin 125 | if not TransformValid then PrepareTransform; 126 | Result := FDestWidth; 127 | end; 128 | 129 | function TMyProjectiveTransformation.GetTransformedBounds( 130 | const ASrcRect: TFloatRect): TFloatRect; 131 | var 132 | p0, p1, p2, p3: TFloatPoint; 133 | begin 134 | p0 := Transform(FloatPoint(X0, Y0)); 135 | p1 := Transform(FloatPoint(X1, Y1)); 136 | p2 := Transform(FloatPoint(X2, Y2)); 137 | p3 := Transform(FloatPoint(X3, Y3)); 138 | 139 | // p0 := (FloatPoint(X0, Y0)); 140 | // p1 := (FloatPoint(X1, Y1)); 141 | // p2 := (FloatPoint(X2, Y2)); 142 | // p3 := (FloatPoint(X3, Y3)); 143 | 144 | Result.Left := Min(Min(p0.X, p1.X), Min(p2.X, p3.X)); 145 | Result.Right := Max(Max(p0.X, p1.X), Max(p2.X, p3.X)); 146 | Result.Top := Min(Min(p0.Y, p1.Y), Min(p2.Y, p3.Y)); 147 | Result.Bottom := Max(Max(p0.Y, p1.Y), Max(p2.Y, p3.Y)); 148 | end; 149 | 150 | function Distance(P1, P2: TFloatPoint): Single; 151 | begin 152 | Result := Sqrt(Sqr(P1.X - P2.X) + Sqr(P1.Y - P2.Y)); 153 | end; 154 | 155 | procedure TMyProjectiveTransformation.PrepareTransform; 156 | var 157 | widthA, widthB, heightA, heightB: TFloat; 158 | src, dst: TArray; 159 | begin 160 | src := TArray.Create( 161 | FloatPoint(X0, Y0), 162 | FloatPoint(X1, Y1), 163 | FloatPoint(X2, Y2), 164 | FloatPoint(X3, Y3) 165 | ); 166 | widthA := Distance(src[2], src[3]); 167 | widthB := Distance(src[1], src[0]); 168 | FDestWidth := Max(widthA, widthB); 169 | 170 | heightA := Distance(src[1], src[2]); 171 | heightB := Distance(src[0], src[3]); 172 | FDestHeight := Max(heightA, heightB); 173 | 174 | dst := TArray.Create( 175 | FloatPoint(0, 0), 176 | FloatPoint(FDestWidth, 0), 177 | FloatPoint(FDestWidth, FDestHeight), 178 | FloatPoint(0, FDestHeight) 179 | ); 180 | 181 | FMatrix := getPerspectiveTransform(src, dst); 182 | // Invert(FMatrix); 183 | inherited; 184 | end; 185 | 186 | procedure TMyProjectiveTransformation.ReverseTransformFixed(DstX, DstY: TFixed; 187 | out SrcX, SrcY: TFixed); 188 | var 189 | Z: TFixed; 190 | Zf: TFloat; 191 | begin 192 | Z := FixedMul(FInverseFixedMatrix[0, 2], DstX) + 193 | FixedMul(FInverseFixedMatrix[1, 2], DstY) + FInverseFixedMatrix[2, 2]; 194 | 195 | if Z = 0 then Exit; 196 | 197 | {$IFDEF UseInlining} 198 | SrcX := FixedMul(DstX, FInverseFixedMatrix[0, 0]) + 199 | FixedMul(DstY, FInverseFixedMatrix[1, 0]) + FInverseFixedMatrix[2, 0]; 200 | SrcY := FixedMul(DstX, FInverseFixedMatrix[0,1]) + 201 | FixedMul(DstY, FInverseFixedMatrix[1, 1]) + FInverseFixedMatrix[2, 1]; 202 | {$ELSE} 203 | inherited; 204 | {$ENDIF} 205 | 206 | if Z <> FixedOne then 207 | begin 208 | EMMS; 209 | Zf := FixedOne / Z; 210 | SrcX := Round(SrcX * Zf); 211 | SrcY := Round(SrcY * Zf); 212 | end; 213 | end; 214 | 215 | procedure TMyProjectiveTransformation.ReverseTransformFloat(DstX, DstY: TFloat; 216 | out SrcX, SrcY: TFloat); 217 | var 218 | Z: TFloat; 219 | begin 220 | EMMS; 221 | Z := FInverseMatrix[0, 2] * DstX + FInverseMatrix[1, 2] * DstY + 222 | FInverseMatrix[2, 2]; 223 | 224 | if Z = 0 then Exit; 225 | 226 | {$IFDEF UseInlining} 227 | SrcX := DstX * FInverseMatrix[0, 0] + DstY * FInverseMatrix[1, 0] + 228 | FInverseMatrix[2, 0]; 229 | SrcY := DstX * FInverseMatrix[0, 1] + DstY * FInverseMatrix[1, 1] + 230 | FInverseMatrix[2, 1]; 231 | {$ELSE} 232 | inherited; 233 | {$ENDIF} 234 | 235 | if Z <> 1 then 236 | begin 237 | Z := 1 / Z; 238 | SrcX := SrcX * Z; 239 | SrcY := SrcY * Z; 240 | end; 241 | end; 242 | 243 | procedure TMyProjectiveTransformation.SetX0(Value: TFloat); 244 | begin 245 | FQuadX[0] := Value; 246 | Changed; 247 | end; 248 | 249 | procedure TMyProjectiveTransformation.SetX1(Value: TFloat); 250 | begin 251 | FQuadX[1] := Value; 252 | Changed; 253 | end; 254 | 255 | procedure TMyProjectiveTransformation.SetX2(Value: TFloat); 256 | begin 257 | FQuadX[2] := Value; 258 | Changed; 259 | end; 260 | 261 | procedure TMyProjectiveTransformation.SetX3(Value: TFloat); 262 | begin 263 | FQuadX[3] := Value; 264 | Changed; 265 | end; 266 | 267 | procedure TMyProjectiveTransformation.SetY0(Value: TFloat); 268 | begin 269 | FQuadY[0] := Value; 270 | Changed; 271 | end; 272 | 273 | procedure TMyProjectiveTransformation.SetY1(Value: TFloat); 274 | begin 275 | FQuadY[1] := Value; 276 | Changed; 277 | end; 278 | 279 | procedure TMyProjectiveTransformation.SetY2(Value: TFloat); 280 | begin 281 | FQuadY[2] := Value; 282 | Changed; 283 | end; 284 | 285 | procedure TMyProjectiveTransformation.SetY3(Value: TFloat); 286 | begin 287 | FQuadY[3] := Value; 288 | Changed; 289 | end; 290 | 291 | 292 | procedure TMyProjectiveTransformation.TransformFixed(SrcX, SrcY: TFixed; 293 | out DstX, DstY: TFixed); 294 | var 295 | Z: TFixed; 296 | Zf: TFloat; 297 | begin 298 | Z := FixedMul(FFixedMatrix[0, 2], SrcX) + 299 | FixedMul(FFixedMatrix[1, 2], SrcY) + FFixedMatrix[2, 2]; 300 | 301 | if Z = 0 then Exit; 302 | 303 | {$IFDEF UseInlining} 304 | DstX := FixedMul(SrcX, FFixedMatrix[0, 0]) + 305 | FixedMul(SrcY, FFixedMatrix[1, 0]) + FFixedMatrix[2, 0]; 306 | DstY := FixedMul(SrcX, FFixedMatrix[0, 1]) + 307 | FixedMul(SrcY, FFixedMatrix[1, 1]) + FFixedMatrix[2, 1]; 308 | {$ELSE} 309 | inherited; 310 | {$ENDIF} 311 | 312 | if Z <> FixedOne then 313 | begin 314 | EMMS; 315 | Zf := FixedOne / Z; 316 | DstX := Round(DstX * Zf); 317 | DstY := Round(DstY * Zf); 318 | end; 319 | end; 320 | 321 | procedure TMyProjectiveTransformation.TransformFloat(SrcX, SrcY: TFloat; 322 | out DstX, DstY: TFloat); 323 | var 324 | Z: TFloat; 325 | begin 326 | EMMS; 327 | Z := FMatrix[0, 2] * SrcX + FMatrix[1, 2] * SrcY + FMatrix[2, 2]; 328 | 329 | if Z = 0 then Exit; 330 | 331 | {$IFDEF UseInlining} 332 | DstX := SrcX * Matrix[0, 0] + SrcY * Matrix[1, 0] + Matrix[2, 0]; 333 | DstY := SrcX * Matrix[0, 1] + SrcY * Matrix[1, 1] + Matrix[2, 1]; 334 | {$ELSE} 335 | inherited; 336 | {$ENDIF} 337 | 338 | if Z <> 1 then 339 | begin 340 | Z := 1 / Z; 341 | DstX := DstX * Z; 342 | DstY := DstY * Z; 343 | end; 344 | end; 345 | 346 | end. 347 | -------------------------------------------------------------------------------- /Demo/PhotoCorrect/PhotoCorrect.dpr: -------------------------------------------------------------------------------- 1 | program PhotoCorrect; 2 | 3 | uses 4 | System.StartUpCopy, 5 | FMX.Forms, 6 | PhotoCorrectDemoMain in 'PhotoCorrectDemoMain.pas' {PhotoCorrectMainForm}, 7 | PerspectiveCorrect in 'PerspectiveCorrect.pas', 8 | SimpleSVD in 'SimpleSVD.pas'; 9 | 10 | {$R *.res} 11 | 12 | begin 13 | Application.Initialize; 14 | Application.CreateForm(TPhotoCorrectMainForm, PhotoCorrectMainForm); 15 | Application.Run; 16 | end. 17 | -------------------------------------------------------------------------------- /Demo/PhotoCorrect/PhotoCorrectDemoMain.pas: -------------------------------------------------------------------------------- 1 | unit PhotoCorrectDemoMain; 2 | 3 | interface 4 | 5 | uses 6 | System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants, 7 | FMX.Types, FMX.Controls, FMX.Forms, FMX.Graphics, FMX.Dialogs, FMX.ListBox, 8 | FMX.Controls.Presentation, FMX.StdCtrls, FMX.Objects, FMX.Layouts, 9 | FMX.Platform, GR32, GR32_Resamplers, GR32_Transforms, Math; 10 | 11 | type 12 | TPhotoCorrectMainForm = class(TForm) 13 | Layout2: TLayout; 14 | Image1: TImage; 15 | Image2: TImage; 16 | Rectangle3: TRectangle; 17 | Label13: TLabel; 18 | Rectangle1: TRectangle; 19 | Label1: TLabel; 20 | CmbResamplerClassNames: TComboBox; 21 | btnReset: TButton; 22 | btnApply: TButton; 23 | Path1: TPath; 24 | procedure Layout2Resize(Sender: TObject); 25 | procedure FormCreate(Sender: TObject); 26 | procedure btnResetClick(Sender: TObject); 27 | procedure CmbResamplerClassNamesChange(Sender: TObject); 28 | procedure btnApplyClick(Sender: TObject); 29 | private 30 | { Private declarations } 31 | FChanging: Boolean; 32 | Transformation: TProjectiveTransformation; 33 | FScaleFactor: Single; 34 | Vertices: array [0 .. 3] of TFloatPoint; 35 | Shapes: array [0 .. 3] of TSelectionPoint; 36 | procedure DoPointChanged(Sender: TObject; var X, Y: Single); 37 | procedure DoTransform; 38 | function GetSourceRect: TFloatRect; 39 | procedure ChangePath; 40 | public 41 | { Public declarations } 42 | end; 43 | 44 | var 45 | PhotoCorrectMainForm: TPhotoCorrectMainForm; 46 | 47 | implementation 48 | 49 | {$R *.fmx} 50 | 51 | uses 52 | PerspectiveCorrect; 53 | 54 | 55 | procedure TPhotoCorrectMainForm.btnApplyClick(Sender: TObject); 56 | begin 57 | DoTransform; 58 | end; 59 | 60 | procedure TPhotoCorrectMainForm.btnResetClick(Sender: TObject); 61 | var 62 | s: TSize; 63 | I: Integer; 64 | begin 65 | FChanging := True; 66 | s := Image1.Bitmap.Size; 67 | Vertices[0] := FloatPoint(0, 0); 68 | Vertices[1] := FloatPoint(s.Width, 0); 69 | Vertices[2] := FloatPoint(s.Width, s.Height); 70 | Vertices[3] := FloatPoint(0, s.Height); 71 | for I := 0 to 3 do 72 | Shapes[I].Position.Point := PointF(Vertices[I].X, Vertices[I].Y); 73 | FChanging := False; 74 | ChangePath; 75 | end; 76 | 77 | procedure TPhotoCorrectMainForm.ChangePath; 78 | var 79 | I: Integer; 80 | begin 81 | if FChanging then 82 | Exit; 83 | Path1.Position.Point := PointF(0,0); 84 | Path1.Size.Size := Image1.Bitmap.Size; 85 | Path1.BeginUpdate; 86 | Path1.Data.Clear; 87 | Path1.Data.MoveTo(PointF(Vertices[0].X,Vertices[0].Y)); 88 | for I := 1 to 3 do 89 | begin 90 | Path1.Data.LineTo(PointF(Vertices[I].X,Vertices[I].Y)); 91 | end; 92 | Path1.Data.ClosePath; 93 | Path1.EndUpdate; 94 | Path1.Repaint; 95 | end; 96 | 97 | procedure TPhotoCorrectMainForm.CmbResamplerClassNamesChange(Sender: TObject); 98 | begin 99 | DoTransform; 100 | end; 101 | 102 | procedure TPhotoCorrectMainForm.DoPointChanged(Sender: TObject; var X, Y: Single); 103 | var 104 | idx: Integer; 105 | begin 106 | idx := (Sender as TComponent).Tag; 107 | Vertices[idx].X := X; 108 | Vertices[idx].Y := Y; 109 | ChangePath; 110 | end; 111 | 112 | procedure TPhotoCorrectMainForm.DoTransform; 113 | var 114 | src, dst: TBitmap32; 115 | I: Integer; 116 | dstBitmap, tmp: TBitmap; 117 | X, Y: array [0 .. 3] of TFloat; 118 | W: Integer; 119 | FQuadX: array [0 .. 3] of TFloat; 120 | FQuadY: array [0 .. 3] of TFloat; 121 | tr: TMyProjectiveTransformation; 122 | srcPts, dstPts: TArray; 123 | begin 124 | tr := TMyProjectiveTransformation.Create; 125 | try 126 | tr.SrcRect := Self.GetSourceRect; 127 | tr.X0 := Vertices[0].X; 128 | tr.X1 := Vertices[1].X; 129 | tr.X2 := Vertices[2].X; 130 | tr.X3 := Vertices[3].X; 131 | tr.Y0 := Vertices[0].Y; 132 | tr.Y1 := Vertices[1].Y; 133 | tr.Y2 := Vertices[2].Y; 134 | tr.Y3 := Vertices[3].Y; 135 | src := TBitmap32.Create(); 136 | dst := TBitmap32.Create(); 137 | dstBitmap := TBitmap.Create; 138 | try 139 | src.Assign(Image1.Bitmap); 140 | with CmbResamplerClassNames do 141 | if ItemIndex >= 0 then 142 | src.ResamplerClassName := Items[ItemIndex]; 143 | dst.SetSize(Round(tr.DestWidth), Round(tr.DestHeight)); 144 | dst.Clear($00000000); 145 | Transform(dst, src, tr); 146 | dstBitmap.Assign(dst); 147 | if FScaleFactor = 1 then 148 | Image2.Bitmap := dstBitmap 149 | else 150 | begin 151 | tmp := TBitmap.Create; 152 | try 153 | tmp.SetSize(Round(dstBitmap.Width * FScaleFactor), Round(dstBitmap.Height * FScaleFactor)); 154 | tmp.Canvas.BeginScene; 155 | tmp.Clear(0); 156 | tmp.Canvas.DrawBitmap(dstBitmap, dstBitmap.Bounds, tmp.Bounds, 1); 157 | tmp.Canvas.EndScene; 158 | Image2.Bitmap := tmp; 159 | finally 160 | tmp.Free; 161 | end; 162 | end; 163 | finally 164 | dstBitmap.Free; 165 | dst.Free; 166 | src.Free; 167 | end; 168 | finally 169 | tr.Free; 170 | end; 171 | 172 | end; 173 | procedure TPhotoCorrectMainForm.FormCreate(Sender: TObject); 174 | var 175 | I: Integer; 176 | ScreenSrv: IFMXScreenService; 177 | s: TSize; 178 | begin 179 | FChanging := True; 180 | if TPlatformServices.Current.SupportsPlatformService(IFMXScreenService, ScreenSrv) then 181 | FScaleFactor := ScreenSrv.GetScreenScale 182 | else 183 | FScaleFactor := 1; 184 | Transformation := TProjectiveTransformation.Create; 185 | s := Image1.Bitmap.Size; 186 | Vertices[0] := FloatPoint(0, 0); 187 | Vertices[1] := FloatPoint(s.Width, 0); 188 | Vertices[2] := FloatPoint(s.Width, s.Height); 189 | Vertices[3] := FloatPoint(0, s.Height); 190 | for I := 0 to 3 do 191 | begin 192 | Shapes[I] := TSelectionPoint.Create(Self); 193 | Shapes[I].Parent := Image1; 194 | Shapes[I].GripSize := 9; 195 | Shapes[I].Position.X := Vertices[I].X; 196 | Shapes[I].Position.Y := Vertices[I].Y; 197 | Shapes[I].OnTrack := DoPointChanged; 198 | Shapes[I].Tag := I; 199 | end; 200 | ResamplerList.GetClassNames(CmbResamplerClassNames.Items); 201 | CmbResamplerClassNames.ItemIndex := 0; 202 | FChanging := False; 203 | ChangePath; 204 | end; 205 | 206 | function TPhotoCorrectMainForm.GetSourceRect: TFloatRect; 207 | var 208 | minx, maxx, miny, maxy: TFloat; 209 | I: Integer; 210 | begin 211 | minx := MaxSingle; 212 | miny := MaxSingle; 213 | maxx := -MaxSingle; 214 | maxy := -MaxSingle; 215 | 216 | for I := 0 to 3 do 217 | begin 218 | maxx := Max(maxx, Vertices[I].X); 219 | maxy := Max(maxy, Vertices[I].Y); 220 | minx := Min(minx, Vertices[I].X); 221 | miny := Min(miny, Vertices[I].Y); 222 | end; 223 | 224 | Result := FloatRect(minx, miny, maxx, maxy); 225 | end; 226 | 227 | procedure TPhotoCorrectMainForm.Layout2Resize(Sender: TObject); 228 | begin 229 | Image1.Position.Point := TPoint.Zero; 230 | if Layout2.Width > Layout2.Height then 231 | begin 232 | Image1.Size.Size := TSizeF.Create(Layout2.Width / 2, Layout2.Height); 233 | Image2.Position.Point := PointF(Layout2.Width / 2, 0); 234 | Image2.Size.Size := TSizeF.Create(Layout2.Width / 2, Layout2.Height); 235 | end 236 | else 237 | begin 238 | Image1.Size.Size := TSizeF.Create(Layout2.Width, Layout2.Height / 2); 239 | Image2.Position.Point := PointF(0, Layout2.Height / 2); 240 | Image2.Size.Size := TSizeF.Create(Layout2.Width, Layout2.Height / 2); 241 | end; 242 | end; 243 | 244 | end. 245 | -------------------------------------------------------------------------------- /Demo/RatingBarDemo/.gitignore: -------------------------------------------------------------------------------- 1 | /Android 2 | /Win32 3 | /__history 4 | /RatingBarDemo.res 5 | -------------------------------------------------------------------------------- /Demo/RatingBarDemo/AndroidManifest.template.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | 10 | 11 | <%uses-permission%> 12 | 13 | 21 | 22 | <%application-meta-data%> 23 | <%services%> 24 | 26 | 30 | 31 | 33 | 34 | 35 | 36 | 37 | 38 | <%activity%> 39 | <%receivers%> 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /Demo/RatingBarDemo/RatingBarDemo.dpr: -------------------------------------------------------------------------------- 1 | program RatingBarDemo; 2 | 3 | uses 4 | System.StartUpCopy, 5 | FMX.Forms, 6 | RatingBarDemoMain in 'RatingBarDemoMain.pas' {RatingBarDemoForm}; 7 | 8 | {$R *.res} 9 | 10 | begin 11 | Application.Initialize; 12 | Application.CreateForm(TRatingBarDemoForm, RatingBarDemoForm); 13 | Application.Run; 14 | end. 15 | -------------------------------------------------------------------------------- /Demo/RatingBarDemo/RatingBarDemoMain.fmx: -------------------------------------------------------------------------------- 1 | object RatingBarDemoForm: TRatingBarDemoForm 2 | Left = 0 3 | Top = 0 4 | Caption = 'FMXRatingBar Demo' 5 | ClientHeight = 650 6 | ClientWidth = 402 7 | FormFactor.Width = 320 8 | FormFactor.Height = 480 9 | FormFactor.Devices = [Desktop] 10 | DesignerMasterStyle = 0 11 | object Layout1: TLayout 12 | Align = Top 13 | Size.Width = 402.000000000000000000 14 | Size.Height = 140.000000000000000000 15 | Size.PlatformDefault = False 16 | TabOrder = 3 17 | object FMXRatingBar1: TFMXRatingBar 18 | Align = Center 19 | Size.Width = 240.000000000000000000 20 | Size.Height = 44.000000000000000000 21 | Size.PlatformDefault = False 22 | Data.Path = { 23 | 0B00000000000000000070431D94854101000000209F6243D514D34101000000 24 | 74C06743C56128420100000068665A432D6B0142010000005C0C4D43C5612842 25 | 0100000017315243D514D34101000000CDCC44431D94854101000000B9525543 26 | FBE585410100000068665A430000803F01000000147A5F43FBE5854103000000 27 | 0028924500102645} 28 | ActiveColor = claRoyalblue 29 | InActiveColor = x30000000 30 | Stroke.Color = claNull 31 | Space = 6.000000000000000000 32 | Value = 3.000000000000000000 33 | Maximum = 5.000000000000000000 34 | OnChanged = FMXRatingBar1Changed 35 | end 36 | object Label1: TLabel 37 | Align = Bottom 38 | StyledSettings = [Family, Style, FontColor] 39 | Position.Y = 93.000000000000000000 40 | Size.Width = 402.000000000000000000 41 | Size.Height = 47.000000000000000000 42 | Size.PlatformDefault = False 43 | TextSettings.Font.Size = 20.000000000000000000 44 | TextSettings.HorzAlign = Center 45 | Text = '3' 46 | TabOrder = 0 47 | end 48 | end 49 | object Layout2: TLayout 50 | Align = Top 51 | Position.Y = 140.000000000000000000 52 | Size.Width = 402.000000000000000000 53 | Size.Height = 140.000000000000000000 54 | Size.PlatformDefault = False 55 | TabOrder = 2 56 | object FMXRatingBar2: TFMXRatingBar 57 | Align = Center 58 | Size.Width = 240.000000000000000000 59 | Size.Height = 44.000000000000000000 60 | Size.PlatformDefault = False 61 | Data.Path = { 62 | 0600000000000000CDCC4443F4F274410100000000004C430000004101000000 63 | 62ED6843EA940041010000000000704306C97341010000000E6B5A439B7E1342 64 | 0300000000FFCC427EBA3C43} 65 | ActiveColor = claRed 66 | InActiveColor = x30000000 67 | Stroke.Color = claNull 68 | Space = 6.000000000000000000 69 | Value = 5.000000000000000000 70 | Maximum = 5.000000000000000000 71 | OnChanged = FMXRatingBar2Changed 72 | end 73 | object Label2: TLabel 74 | Align = Bottom 75 | StyledSettings = [Family, Style, FontColor] 76 | Position.Y = 93.000000000000000000 77 | Size.Width = 402.000000000000000000 78 | Size.Height = 47.000000000000000000 79 | Size.PlatformDefault = False 80 | TextSettings.Font.Size = 20.000000000000000000 81 | TextSettings.HorzAlign = Center 82 | Text = '5' 83 | TabOrder = 0 84 | end 85 | end 86 | object Layout3: TLayout 87 | Align = Top 88 | Position.Y = 280.000000000000000000 89 | Size.Width = 402.000000000000000000 90 | Size.Height = 140.000000000000000000 91 | Size.PlatformDefault = False 92 | TabOrder = 1 93 | object FMXRatingBar3: TFMXRatingBar 94 | Align = Center 95 | Size.Width = 240.000000000000000000 96 | Size.Height = 44.000000000000000000 97 | Size.PlatformDefault = False 98 | Data.Path = { 99 | 0F0000000000000067665A435B92F54002000000F2125F430000404002000000 100 | ECA66643000040400200000074536B435B92F540020000000000704362924541 101 | 020000000000704388699F410200000074536B43D5CDC4410100000067665A43 102 | B21B26420100000058794943D5CDC44102000000CDCC444387699F4102000000 103 | CDCC44436092454102000000587949435892F54002000000E4254E4300004040 104 | 02000000DEB95543000040400200000067665A435B92F540} 105 | ActiveColor = claSteelblue 106 | InActiveColor = x30000000 107 | Stroke.Color = claNull 108 | Space = 6.000000000000000000 109 | Value = 4.000000000000000000 110 | Maximum = 5.000000000000000000 111 | OnChanged = FMXRatingBar3Changed 112 | end 113 | object Label3: TLabel 114 | Align = Bottom 115 | StyledSettings = [Family, Style, FontColor] 116 | Position.Y = 93.000000000000000000 117 | Size.Width = 402.000000000000000000 118 | Size.Height = 47.000000000000000000 119 | Size.PlatformDefault = False 120 | TextSettings.Font.Size = 20.000000000000000000 121 | TextSettings.HorzAlign = Center 122 | Text = '4' 123 | TabOrder = 0 124 | end 125 | end 126 | end 127 | -------------------------------------------------------------------------------- /Demo/RatingBarDemo/RatingBarDemoMain.pas: -------------------------------------------------------------------------------- 1 | unit RatingBarDemoMain; 2 | 3 | interface 4 | 5 | uses 6 | System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants, 7 | FMX.Types, FMX.Controls, FMX.Forms, FMX.Graphics, FMX.Dialogs, FMX.Layouts, 8 | FMX.Objects, FMX.RatingBar, FMX.Controls.Presentation, FMX.StdCtrls; 9 | 10 | type 11 | TRatingBarDemoForm = class(TForm) 12 | FMXRatingBar1: TFMXRatingBar; 13 | FMXRatingBar2: TFMXRatingBar; 14 | FMXRatingBar3: TFMXRatingBar; 15 | Layout1: TLayout; 16 | Layout2: TLayout; 17 | Layout3: TLayout; 18 | Label1: TLabel; 19 | Label2: TLabel; 20 | Label3: TLabel; 21 | procedure FMXRatingBar1Changed(Sender: TObject); 22 | procedure FMXRatingBar3Changed(Sender: TObject); 23 | procedure FMXRatingBar2Changed(Sender: TObject); 24 | private 25 | { Private declarations } 26 | public 27 | { Public declarations } 28 | end; 29 | 30 | var 31 | RatingBarDemoForm: TRatingBarDemoForm; 32 | 33 | implementation 34 | 35 | {$R *.fmx} 36 | 37 | procedure TRatingBarDemoForm.FMXRatingBar1Changed(Sender: TObject); 38 | begin 39 | Label1.Text := FMXRatingBar1.Value.ToString; 40 | end; 41 | 42 | procedure TRatingBarDemoForm.FMXRatingBar2Changed(Sender: TObject); 43 | begin 44 | Label2.Text := FMXRatingBar2.Value.ToString; 45 | end; 46 | 47 | procedure TRatingBarDemoForm.FMXRatingBar3Changed(Sender: TObject); 48 | begin 49 | Label3.Text := FMXRatingBar3.Value.ToString; 50 | end; 51 | 52 | end. 53 | -------------------------------------------------------------------------------- /Demo/RotatingTextDemo/.gitignore: -------------------------------------------------------------------------------- 1 | /RotateTextDemoProj.res 2 | /RotateTextDemoProj.dproj.local 3 | /RotateTextDemoProj.identcache 4 | /Android 5 | /Win32 6 | /__history 7 | -------------------------------------------------------------------------------- /Demo/RotatingTextDemo/AndroidManifest.template.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | 10 | 11 | <%uses-permission%> 12 | 13 | 21 | 22 | <%application-meta-data%> 23 | <%services%> 24 | 26 | 30 | 31 | 33 | 34 | 35 | 36 | 37 | 38 | <%activity%> 39 | <%receivers%> 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /Demo/RotatingTextDemo/Entitlement.TemplateOSX32.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | <%appSandboxKeys%> 6 | 7 | 8 | -------------------------------------------------------------------------------- /Demo/RotatingTextDemo/Entitlement.TemplateiOS.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | <%getTaskAllowKey%> 6 | <%applicationIdentifier%> 7 | <%pushNotificationKey%> 8 | <%keychainAccessGroups%> 9 | 10 | 11 | -------------------------------------------------------------------------------- /Demo/RotatingTextDemo/RotateTextDemoMain.fmx: -------------------------------------------------------------------------------- 1 | object RotatingTextDemoForm: TRotatingTextDemoForm 2 | Left = 0 3 | Top = 0 4 | Caption = 'Rotating Text Demo' 5 | ClientHeight = 468 6 | ClientWidth = 853 7 | FormFactor.Width = 320 8 | FormFactor.Height = 480 9 | FormFactor.Orientations = [Landscape] 10 | FormFactor.Devices = [Desktop] 11 | OnCreate = FormCreate 12 | DesignerMasterStyle = 0 13 | object Text1: TText 14 | Align = Top 15 | Position.X = 145.000000000000000000 16 | Position.Y = 137.000000000000000000 17 | Size.Width = 708.000000000000000000 18 | Size.Height = 73.000000000000000000 19 | Size.PlatformDefault = False 20 | Text = 'FMXComponents TFMXRotatingText' 21 | TextSettings.Font.Family = 'Raleway' 22 | TextSettings.Font.Size = 24.000000000000000000 23 | end 24 | object ListBox1: TListBox 25 | Align = MostLeft 26 | Size.Width = 145.000000000000000000 27 | Size.Height = 468.000000000000000000 28 | Size.PlatformDefault = False 29 | StyleLookup = 'listboxstyle' 30 | TabOrder = 1 31 | DisableFocusEffect = True 32 | ItemHeight = 40.000000000000000000 33 | Items.Strings = ( 34 | 'Linear' 35 | 'Quadratic' 36 | 'Cubic' 37 | 'Quartic' 38 | 'Quintic' 39 | 'Sinusoidal' 40 | 'Exponential' 41 | 'Circular' 42 | 'Elastic' 43 | 'Back' 44 | 'Bounce') 45 | DefaultItemStyles.ItemStyle = '' 46 | DefaultItemStyles.GroupHeaderStyle = '' 47 | DefaultItemStyles.GroupFooterStyle = '' 48 | OnChange = ListBox1Change 49 | Viewport.Width = 141.000000000000000000 50 | Viewport.Height = 464.000000000000000000 51 | end 52 | object GridPanelLayout1: TGridPanelLayout 53 | Align = Client 54 | Size.Width = 708.000000000000000000 55 | Size.Height = 258.000000000000000000 56 | Size.PlatformDefault = False 57 | TabOrder = 2 58 | ColumnCollection = < 59 | item 60 | Value = 50.000000000000000000 61 | end 62 | item 63 | Value = 50.000000000000000000 64 | end> 65 | ControlCollection = < 66 | item 67 | Column = 0 68 | Control = FMXRotatingText1 69 | Row = 0 70 | end 71 | item 72 | Column = 1 73 | Control = FMXRotatingText2 74 | Row = 0 75 | end 76 | item 77 | Column = 0 78 | Control = TextLeft 79 | Row = 1 80 | end 81 | item 82 | Column = 1 83 | Control = TextRight 84 | Row = 1 85 | end> 86 | RowCollection = < 87 | item 88 | Value = 100.000000000000000000 89 | end 90 | item 91 | SizeStyle = Auto 92 | end 93 | item 94 | SizeStyle = Auto 95 | end> 96 | object FMXRotatingText1: TFMXRotatingText 97 | Fill.Color = claBlack 98 | Size.Width = 303.000000000000000000 99 | Size.Height = 28.175998687744140000 100 | Size.PlatformDefault = False 101 | Lines.Strings = ( 102 | 'HELLO' 103 | 'GOOD' 104 | 'FIREMONKEY' 105 | 'AWESOME' 106 | 'DELPHI') 107 | TextSettings.Font.Family = 'Raleway' 108 | TextSettings.Font.Size = 24.000000000000000000 109 | TextSettings.FontColor = xFFFFA036 110 | UpdateDuration = 2.000000000000000000 111 | AnimationDuration = 1.000000000000000000 112 | RotatingDirection = TopToBottom 113 | end 114 | object FMXRotatingText2: TFMXRotatingText 115 | Fill.Color = claBlack 116 | Position.X = 354.000000000000000000 117 | Size.Width = 300.000000000000000000 118 | Size.Height = 28.175998687744140000 119 | Size.PlatformDefault = False 120 | Lines.Strings = ( 121 | 'HELLO' 122 | 'GOOD' 123 | 'FIREMONKEY' 124 | 'AWESOME' 125 | 'DELPHI') 126 | TextSettings.Font.Family = 'Raleway' 127 | TextSettings.Font.Size = 24.000000000000000000 128 | TextSettings.FontColor = xFFFFA036 129 | UpdateDuration = 2.000000000000000000 130 | AnimationDuration = 1.000000000000000000 131 | RotatingDirection = TopToBottom 132 | end 133 | object TextLeft: TText 134 | Anchors = [] 135 | Position.X = 27.000000000000000000 136 | Position.Y = 208.000000000000000000 137 | Size.Width = 300.000000000000000000 138 | Size.Height = 50.000000000000000000 139 | Size.PlatformDefault = False 140 | TextSettings.Font.Family = 'Raleway' 141 | TextSettings.Font.Size = 24.000000000000000000 142 | end 143 | object TextRight: TText 144 | Anchors = [] 145 | Position.X = 381.000000000000000000 146 | Position.Y = 208.000000000000000000 147 | Size.Width = 300.000000000000000000 148 | Size.Height = 50.000000000000000000 149 | Size.PlatformDefault = False 150 | TextSettings.Font.Family = 'Raleway' 151 | TextSettings.Font.Size = 24.000000000000000000 152 | end 153 | end 154 | object Layout1: TLayout 155 | Align = Top 156 | Position.X = 145.000000000000000000 157 | Size.Width = 708.000000000000000000 158 | Size.Height = 137.000000000000000000 159 | Size.PlatformDefault = False 160 | TabOrder = 4 161 | object GroupBox1: TGroupBox 162 | Align = Left 163 | Margins.Left = 8.000000000000000000 164 | Position.X = 8.000000000000000000 165 | Size.Width = 209.000000000000000000 166 | Size.Height = 137.000000000000000000 167 | Size.PlatformDefault = False 168 | Text = 'Rotating Direction' 169 | TabOrder = 0 170 | object rbBottomToTop: TRadioButton 171 | GroupName = 'Direction' 172 | Position.X = 33.000000000000000000 173 | Position.Y = 78.000000000000000000 174 | Size.Width = 168.000000000000000000 175 | Size.Height = 19.000000000000000000 176 | Size.PlatformDefault = False 177 | TabOrder = 0 178 | Text = 'Bottom to Top' 179 | OnChange = rbTopToBottomChange 180 | end 181 | object rbTopToBottom: TRadioButton 182 | GroupName = 'Direction' 183 | IsChecked = True 184 | Position.X = 33.000000000000000000 185 | Position.Y = 38.000000000000000000 186 | Size.Width = 168.000000000000000000 187 | Size.Height = 19.000000000000000000 188 | Size.PlatformDefault = False 189 | TabOrder = 1 190 | Text = 'Top to Bottom' 191 | end 192 | end 193 | object GroupBox2: TGroupBox 194 | Align = Left 195 | Margins.Left = 8.000000000000000000 196 | Position.X = 225.000000000000000000 197 | Size.Width = 209.000000000000000000 198 | Size.Height = 137.000000000000000000 199 | Size.PlatformDefault = False 200 | Text = 'Select Text' 201 | TabOrder = 1 202 | object rbSelectRight: TRadioButton 203 | GroupName = 'Texts' 204 | Position.X = 33.000000000000000000 205 | Position.Y = 78.000000000000000000 206 | Size.Width = 168.000000000000000000 207 | Size.Height = 19.000000000000000000 208 | Size.PlatformDefault = False 209 | TabOrder = 0 210 | Text = 'Right' 211 | OnChange = rbTopToBottomChange 212 | end 213 | object rbSelectLeft: TRadioButton 214 | GroupName = 'Texts' 215 | IsChecked = True 216 | Position.X = 33.000000000000000000 217 | Position.Y = 38.000000000000000000 218 | Size.Width = 168.000000000000000000 219 | Size.Height = 19.000000000000000000 220 | Size.PlatformDefault = False 221 | TabOrder = 1 222 | Text = 'Left' 223 | end 224 | end 225 | end 226 | end 227 | -------------------------------------------------------------------------------- /Demo/RotatingTextDemo/RotateTextDemoMain.pas: -------------------------------------------------------------------------------- 1 | unit RotateTextDemoMain; 2 | 3 | interface 4 | 5 | uses 6 | System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants, 7 | System.TypInfo, 8 | FMX.Types, FMX.Controls, FMX.Forms, FMX.Graphics, FMX.Dialogs, FMX.Objects, 9 | FMX.RotatingText, FMX.Controls.Presentation, FMX.StdCtrls, FMX.Ani, 10 | FMX.Layouts, FMX.ListBox; 11 | 12 | type 13 | TRotatingTextDemoForm = class(TForm) 14 | rbTopToBottom: TRadioButton; 15 | rbBottomToTop: TRadioButton; 16 | GroupBox1: TGroupBox; 17 | FMXRotatingText1: TFMXRotatingText; 18 | Text1: TText; 19 | ListBox1: TListBox; 20 | GroupBox2: TGroupBox; 21 | rbSelectRight: TRadioButton; 22 | rbSelectLeft: TRadioButton; 23 | GridPanelLayout1: TGridPanelLayout; 24 | FMXRotatingText2: TFMXRotatingText; 25 | TextLeft: TText; 26 | TextRight: TText; 27 | Layout1: TLayout; 28 | procedure FormCreate(Sender: TObject); 29 | procedure rbTopToBottomChange(Sender: TObject); 30 | procedure ListBox1Change(Sender: TObject); 31 | private 32 | { Private declarations } 33 | function GetMoveTypeName(AType: TInterpolationType): string; 34 | function GetSelectRotatingText: TFMXRotatingText; 35 | function GetSelectText: TText; 36 | public 37 | { Public declarations } 38 | end; 39 | 40 | var 41 | RotatingTextDemoForm: TRotatingTextDemoForm; 42 | 43 | implementation 44 | 45 | {$R *.fmx} 46 | 47 | procedure TRotatingTextDemoForm.FormCreate(Sender: TObject); 48 | begin 49 | ListBox1.ItemIndex := 0; 50 | TextLeft.Text := GetMoveTypeName(FMXRotatingText1.MovingType); 51 | TextRight.Text := GetMoveTypeName(FMXRotatingText2.MovingType); 52 | FMXRotatingText1.Start; 53 | FMXRotatingText2.Start; 54 | end; 55 | 56 | function TRotatingTextDemoForm.GetMoveTypeName(AType: TInterpolationType): string; 57 | begin 58 | Result := GetEnumName(TypeInfo(TInterpolationType),Ord(AType)); 59 | end; 60 | 61 | function TRotatingTextDemoForm.GetSelectRotatingText: TFMXRotatingText; 62 | begin 63 | if rbSelectLeft.IsChecked then 64 | Result := FMXRotatingText1 65 | else 66 | Result := FMXRotatingText2; 67 | end; 68 | 69 | function TRotatingTextDemoForm.GetSelectText: TText; 70 | begin 71 | if rbSelectLeft.IsChecked then 72 | Result := TextLeft 73 | else 74 | Result := TextRight; 75 | end; 76 | 77 | procedure TRotatingTextDemoForm.ListBox1Change(Sender: TObject); 78 | begin 79 | GetSelectRotatingText().MovingType := TInterpolationType(ListBox1.ItemIndex); 80 | GetSelectText().Text := GetMoveTypeName(TInterpolationType(ListBox1.ItemIndex)); 81 | end; 82 | 83 | procedure TRotatingTextDemoForm.rbTopToBottomChange(Sender: TObject); 84 | begin 85 | if rbTopToBottom.IsChecked then 86 | begin 87 | FMXRotatingText1.RotatingDirection := TRotatingDirection.TopToBottom; 88 | FMXRotatingText2.RotatingDirection := TRotatingDirection.TopToBottom; 89 | end 90 | else 91 | begin 92 | FMXRotatingText1.RotatingDirection := TRotatingDirection.BottomToTop; 93 | FMXRotatingText2.RotatingDirection := TRotatingDirection.BottomToTop; 94 | end; 95 | end; 96 | 97 | end. 98 | -------------------------------------------------------------------------------- /Demo/RotatingTextDemo/RotateTextDemoProj.dpr: -------------------------------------------------------------------------------- 1 | program RotateTextDemoProj; 2 | 3 | uses 4 | System.StartUpCopy, 5 | FMX.Forms, 6 | RotateTextDemoMain in 'RotateTextDemoMain.pas' {RotatingTextDemoForm}; 7 | 8 | {$R *.res} 9 | 10 | begin 11 | Application.Initialize; 12 | Application.FormFactor.Orientations := [TFormOrientation.InvertedLandscape]; 13 | Application.CreateForm(TRotatingTextDemoForm, RotatingTextDemoForm); 14 | Application.Run; 15 | end. 16 | -------------------------------------------------------------------------------- /Demo/RotatingTextDemo/info.plist.TemplateOSX.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | <%VersionInfoPListKeys%> 6 | <%ExtraInfoPListKeys%> 7 | 8 | 9 | -------------------------------------------------------------------------------- /Demo/RotatingTextDemo/info.plist.TemplateiOS.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | <%VersionInfoPListKeys%> 6 | <%ExtraInfoPListKeys%> 7 | 8 | 9 | -------------------------------------------------------------------------------- /Demo/TestBezierAnimation/.gitignore: -------------------------------------------------------------------------------- 1 | /TestBezierAnimation.identcache 2 | /TestBezierAnimation.stat 3 | -------------------------------------------------------------------------------- /Demo/TestBezierAnimation/AndroidManifest.template.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | 10 | 11 | <%uses-permission%> 12 | 13 | 21 | 22 | <%application-meta-data%> 23 | <%services%> 24 | 26 | 30 | 31 | 33 | 34 | 35 | 36 | 37 | 38 | <%activity%> 39 | <%receivers%> 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /Demo/TestBezierAnimation/TestBezierAnimation.dpr: -------------------------------------------------------------------------------- 1 | program TestBezierAnimation; 2 | 3 | uses 4 | System.StartUpCopy, 5 | FMX.Forms, 6 | TestBezierAnimationMain in 'TestBezierAnimationMain.pas' {CubicBezierAnimationMainForm}, 7 | FMX.BezierAnimation in '..\..\ComponentsSource\FMX.BezierAnimation.pas', 8 | FMX.BezierPanel in '..\..\ComponentsSource\FMX.BezierPanel.pas'; 9 | 10 | {$R *.res} 11 | 12 | begin 13 | Application.Initialize; 14 | Application.CreateForm(TCubicBezierAnimationMainForm, CubicBezierAnimationMainForm); 15 | Application.Run; 16 | end. 17 | -------------------------------------------------------------------------------- /Demo/TestBezierAnimation/TestBezierAnimationMain.fmx: -------------------------------------------------------------------------------- 1 | object CubicBezierAnimationMainForm: TCubicBezierAnimationMainForm 2 | Left = 0 3 | Top = 0 4 | Caption = 'cubic-bezier animation demo' 5 | ClientHeight = 457 6 | ClientWidth = 994 7 | Fill.Kind = Solid 8 | FormFactor.Width = 320 9 | FormFactor.Height = 480 10 | FormFactor.Devices = [Desktop] 11 | OnCreate = FormCreate 12 | DesignerMasterStyle = 0 13 | object pbCanvas: TPaintBox 14 | Align = Left 15 | Margins.Left = 20.000000000000000000 16 | Margins.Top = 20.000000000000000000 17 | Margins.Right = 20.000000000000000000 18 | Margins.Bottom = 20.000000000000000000 19 | Position.X = 20.000000000000000000 20 | Position.Y = 167.000000000000000000 21 | Size.Width = 320.000000000000000000 22 | Size.Height = 270.000000000000000000 23 | Size.PlatformDefault = False 24 | OnPaint = pbCanvasPaint 25 | object SelectionPoint1: TSelectionPoint 26 | GripSize = 9.000000000000000000 27 | Position.X = 56.000000000000000000 28 | Position.Y = 80.000000000000000000 29 | Size.Width = 18.000000000000000000 30 | Size.Height = 18.000000000000000000 31 | Size.PlatformDefault = False 32 | OnTrack = SelectionPoint1Track 33 | end 34 | object SelectionPoint2: TSelectionPoint 35 | GripSize = 9.000000000000000000 36 | Position.X = 64.000000000000000000 37 | Position.Y = 88.000000000000000000 38 | Size.Width = 18.000000000000000000 39 | Size.Height = 18.000000000000000000 40 | Size.PlatformDefault = False 41 | OnTrack = SelectionPoint2Track 42 | end 43 | end 44 | object LayoutTop: TLayout 45 | Align = Top 46 | Position.Y = 50.000000000000000000 47 | Size.Width = 994.000000000000000000 48 | Size.Height = 97.000000000000000000 49 | Size.PlatformDefault = False 50 | TabOrder = 1 51 | object edtEqation: TEdit 52 | Touch.InteractiveGestures = [LongTap, DoubleTap] 53 | TabOrder = 0 54 | Text = '0,0,1,1' 55 | TextSettings.Font.Size = 24.000000000000000000 56 | Position.X = 232.000000000000000000 57 | Position.Y = 24.000000000000000000 58 | Size.Width = 305.000000000000000000 59 | Size.Height = 49.000000000000000000 60 | Size.PlatformDefault = False 61 | StyledSettings = [Family, Style, FontColor] 62 | end 63 | object edtEqation2: TEdit 64 | Touch.InteractiveGestures = [LongTap, DoubleTap] 65 | TabOrder = 1 66 | Text = '0,0,1,1' 67 | TextSettings.Font.Size = 24.000000000000000000 68 | Position.X = 560.000000000000000000 69 | Position.Y = 24.000000000000000000 70 | Size.Width = 305.000000000000000000 71 | Size.Height = 49.000000000000000000 72 | Size.PlatformDefault = False 73 | StyledSettings = [Family, Style, FontColor] 74 | end 75 | object Label1: TLabel 76 | StyledSettings = [Family, Style, FontColor] 77 | FocusControl = edtEqation 78 | Position.X = 24.000000000000000000 79 | Position.Y = 24.000000000000000000 80 | Size.Width = 185.000000000000000000 81 | Size.Height = 49.000000000000000000 82 | Size.PlatformDefault = False 83 | TextSettings.Font.Size = 24.000000000000000000 84 | Text = 'cubic-bezier:' 85 | TabOrder = 2 86 | end 87 | end 88 | object LayoutRunners: TLayout 89 | Align = Client 90 | Size.Width = 634.000000000000000000 91 | Size.Height = 310.000000000000000000 92 | Size.PlatformDefault = False 93 | TabOrder = 2 94 | object Layout1: TLayout 95 | Align = Top 96 | Margins.Left = 8.000000000000000000 97 | Margins.Top = 8.000000000000000000 98 | Margins.Right = 8.000000000000000000 99 | Margins.Bottom = 8.000000000000000000 100 | Position.X = 8.000000000000000000 101 | Position.Y = 168.000000000000000000 102 | Size.Width = 618.000000000000000000 103 | Size.Height = 67.000000000000000000 104 | Size.PlatformDefault = False 105 | TabOrder = 2 106 | object BezierPanel1: TFMXBezierPanel 107 | P2X = 1.000000000000000000 108 | P2Y = 1.000000000000000000 109 | NormalBackground = xFFE5E5E5 110 | NormalForeground = claBlack 111 | SelectedBackground = xFFFF0088 112 | SelectedForeground = claWhite 113 | IsSelected = True 114 | Size.Width = 67.000000000000000000 115 | Size.Height = 67.000000000000000000 116 | Size.PlatformDefault = False 117 | object BezierAnimation1: TFMXBezierAnimation 118 | Duration = 0.200000002980232200 119 | PropertyName = 'Position.X' 120 | StartValue = 0.000000000000000000 121 | StopValue = 560.000000000000000000 122 | P2X = 1.000000000000000000 123 | P2Y = 1.000000000000000000 124 | end 125 | end 126 | end 127 | object Layout2: TLayout 128 | Align = Top 129 | Margins.Left = 8.000000000000000000 130 | Margins.Top = 8.000000000000000000 131 | Margins.Right = 8.000000000000000000 132 | Margins.Bottom = 8.000000000000000000 133 | Position.X = 8.000000000000000000 134 | Position.Y = 251.000000000000000000 135 | Size.Width = 618.000000000000000000 136 | Size.Height = 67.000000000000000000 137 | Size.PlatformDefault = False 138 | TabOrder = 1 139 | object BezierPanel2: TFMXBezierPanel 140 | P2X = 1.000000000000000000 141 | P2Y = 1.000000000000000000 142 | NormalBackground = xFFE5E5E5 143 | NormalForeground = claBlack 144 | SelectedBackground = xFF00AABB 145 | SelectedForeground = claWhite 146 | IsSelected = False 147 | Size.Width = 67.000000000000000000 148 | Size.Height = 67.000000000000000000 149 | Size.PlatformDefault = False 150 | object BezierAnimation2: TFMXBezierAnimation 151 | Duration = 0.200000002980232200 152 | PropertyName = 'Position.X' 153 | StartValue = 0.000000000000000000 154 | StopValue = 560.000000000000000000 155 | P2X = 1.000000000000000000 156 | P2Y = 1.000000000000000000 157 | end 158 | end 159 | end 160 | object LayoutPanels: TLayout 161 | Align = Top 162 | Size.Width = 634.000000000000000000 163 | Size.Height = 160.000000000000000000 164 | Size.PlatformDefault = False 165 | TabOrder = 3 166 | end 167 | end 168 | object Layout3: TLayout 169 | Align = Top 170 | Size.Width = 994.000000000000000000 171 | Size.Height = 50.000000000000000000 172 | Size.PlatformDefault = False 173 | TabOrder = 3 174 | object btnRun: TButton 175 | Position.X = 16.000000000000000000 176 | Position.Y = 1.000000000000000000 177 | Size.Width = 105.000000000000000000 178 | Size.Height = 49.000000000000000000 179 | Size.PlatformDefault = False 180 | TabOrder = 3 181 | Text = 'Run' 182 | OnClick = btnRunClick 183 | end 184 | object trckbrDuration: TTrackBar 185 | CanParentFocus = True 186 | Frequency = 1.000000000000000000 187 | Max = 10.000000000000000000 188 | Min = 1.000000000000000000 189 | Orientation = Horizontal 190 | Position.X = 152.000000000000000000 191 | Position.Y = 16.000000000000000000 192 | Size.Width = 345.000000000000000000 193 | Size.Height = 20.000000000000000000 194 | Size.PlatformDefault = False 195 | TabOrder = 4 196 | Value = 1.000000000000000000 197 | OnChange = trckbrDurationChange 198 | end 199 | object lblDuration: TLabel 200 | Position.X = 544.000000000000000000 201 | Position.Y = 16.000000000000000000 202 | TabOrder = 5 203 | end 204 | end 205 | end 206 | -------------------------------------------------------------------------------- /Demo/TestCallout/.gitignore: -------------------------------------------------------------------------------- 1 | /Android 2 | /Win32 3 | /TestFMXCallout.dproj.local 4 | /TestFMXCallout.res 5 | /__history 6 | -------------------------------------------------------------------------------- /Demo/TestCallout/AndroidManifest.template.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | 10 | 11 | <%uses-permission%> 12 | 13 | 21 | 22 | <%application-meta-data%> 23 | <%services%> 24 | 26 | 30 | 31 | 33 | 34 | 35 | 36 | 37 | 38 | <%activity%> 39 | <%receivers%> 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /Demo/TestCallout/Entitlement.TemplateOSX32.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | <%appSandboxKeys%> 6 | 7 | 8 | -------------------------------------------------------------------------------- /Demo/TestCallout/TestFMXCallout.dpr: -------------------------------------------------------------------------------- 1 | program TestFMXCallout; 2 | 3 | uses 4 | System.StartUpCopy, 5 | FMX.Forms, 6 | TestFMXCalloutMain in 'TestFMXCalloutMain.pas' {Form1}; 7 | 8 | {$R *.res} 9 | 10 | begin 11 | Application.Initialize; 12 | Application.CreateForm(TForm1, Form1); 13 | Application.Run; 14 | end. 15 | -------------------------------------------------------------------------------- /Demo/TestCallout/TestFMXCalloutMain.pas: -------------------------------------------------------------------------------- 1 | unit TestFMXCalloutMain; 2 | 3 | interface 4 | 5 | uses 6 | System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants, 7 | FMX.Types, FMX.Controls, FMX.Forms, FMX.Graphics, FMX.Dialogs, FMX.Objects, 8 | FMX.Controls.Presentation, FMX.StdCtrls, FMX.Layouts, FMX.Edit, FMX.EditBox, 9 | FMX.SpinBox, FMX.Colors, 10 | FMX.Callout, 11 | FMX.Graphics.INativeCanvas, 12 | FMX.Graphics.NativeCanvas; 13 | 14 | type 15 | TForm1 = class(TForm) 16 | Selection1: TSelection; 17 | TopSB: TSpeedButton; 18 | BottomSB: TSpeedButton; 19 | LeftSB: TSpeedButton; 20 | RightSB: TSpeedButton; 21 | XRadiusSpinBox: TSpinBox; 22 | XRadiusLabel: TLabel; 23 | Layout2: TLayout; 24 | YRadiusSpinBox: TSpinBox; 25 | YRadiusLabel: TLabel; 26 | CalloutWidthSpinBox: TSpinBox; 27 | CalloutWidthLabel: TLabel; 28 | CalloutLengthSpinBox: TSpinBox; 29 | CalloutLengthLabel: TLabel; 30 | CalloutOffsetSpinBox: TSpinBox; 31 | CalloutOffsetLabel: TLabel; 32 | CalloutPeakOffsetSpinBox: TSpinBox; 33 | CalloutPeakOffsetLabel: TLabel; 34 | FillColorCB: TComboColorBox; 35 | FillColorLabel: TLabel; 36 | StrokeColorCB: TComboColorBox; 37 | StrokeLabel: TLabel; 38 | ThicknessSpinBox: TSpinBox; 39 | Thickness0Label: TLabel; 40 | NativeDrawSwitch: TSwitch; 41 | Label2: TLabel; 42 | Label1: TLabel; 43 | procedure FormCreate(Sender: TObject); 44 | procedure FormShow(Sender: TObject); 45 | procedure TopSBClick(Sender: TObject); 46 | procedure XRadiusSpinBoxChangeTracking(Sender: TObject); 47 | procedure YRadiusSpinBoxChangeTracking(Sender: TObject); 48 | procedure CalloutWidthSpinBoxChangeTracking(Sender: TObject); 49 | procedure CalloutLengthSpinBoxChangeTracking(Sender: TObject); 50 | procedure CalloutOffsetSpinBoxChangeTracking(Sender: TObject); 51 | procedure CalloutPeakOffsetSpinBoxChangeTracking(Sender: TObject); 52 | procedure FillColorCBChange(Sender: TObject); 53 | procedure StrokeColorCBChange(Sender: TObject); 54 | procedure ThicknessSpinBoxChangeTracking(Sender: TObject); 55 | procedure NativeDrawSwitchClick(Sender: TObject); 56 | private 57 | FCallout: TFMXCallout; 58 | public 59 | { Public declarations } 60 | end; 61 | 62 | var 63 | Form1: TForm1; 64 | 65 | implementation 66 | 67 | {$R *.fmx} 68 | 69 | procedure TForm1.FormCreate(Sender: TObject); 70 | begin 71 | FCallout := TFMXCallout.Create(Self); 72 | Selection1.AddObject(FCallout); 73 | FCallout.HitTest := False; 74 | FCallout.Stroke.Cap := TStrokeCap.Round; 75 | FCallout.Stroke.Join := TStrokeJoin.Round; 76 | FCallout.Align := TAlignLayout.Client; 77 | end; 78 | 79 | procedure TForm1.FormShow(Sender: TObject); 80 | begin 81 | XRadiusSpinBox.Value := FCallout.XRadius; 82 | YRadiusSpinBox.Value := FCallout.YRadius; 83 | CalloutWidthSpinBox.Value := FCallout.CalloutWidth; 84 | CalloutLengthSpinBox.Value := FCallout.CalloutLength; 85 | CalloutOffsetSpinBox.Value := FCallout.CalloutOffset; 86 | CalloutPeakOffsetSpinBox.Value := FCallout.CalloutPeakOffset; 87 | 88 | case FCallout.CalloutPosition of 89 | TCalloutPosition.Top: 90 | TopSB.IsPressed := True; 91 | TCalloutPosition.Bottom: 92 | BottomSB.IsPressed := True; 93 | TCalloutPosition.Left: 94 | LeftSB.IsPressed := True; 95 | TCalloutPosition.Right: 96 | RightSB.IsPressed := True; 97 | end; 98 | 99 | FillColorCB.Color := FCallout.Fill.Color; 100 | StrokeColorCB.Color := FCallout.Stroke.Color; 101 | ThicknessSpinBox.Value := FCallout.Stroke.Thickness; 102 | end; 103 | 104 | procedure TForm1.NativeDrawSwitchClick(Sender: TObject); 105 | begin 106 | FCallout.NativeDraw := NativeDrawSwitch.IsChecked; 107 | end; 108 | 109 | procedure TForm1.XRadiusSpinBoxChangeTracking(Sender: TObject); 110 | begin 111 | FCallout.XRadius := XRadiusSpinBox.Value; 112 | end; 113 | 114 | procedure TForm1.YRadiusSpinBoxChangeTracking(Sender: TObject); 115 | begin 116 | FCallout.YRadius := YRadiusSpinBox.Value; 117 | end; 118 | 119 | procedure TForm1.CalloutWidthSpinBoxChangeTracking(Sender: TObject); 120 | begin 121 | FCallout.CalloutWidth := CalloutWidthSpinBox.Value; 122 | end; 123 | 124 | procedure TForm1.CalloutLengthSpinBoxChangeTracking(Sender: TObject); 125 | begin 126 | FCallout.CalloutLength := CalloutLengthSpinBox.Value; 127 | end; 128 | 129 | procedure TForm1.CalloutOffsetSpinBoxChangeTracking(Sender: TObject); 130 | begin 131 | FCallout.CalloutOffset := CalloutOffsetSpinBox.Value; 132 | end; 133 | 134 | procedure TForm1.CalloutPeakOffsetSpinBoxChangeTracking(Sender: TObject); 135 | begin 136 | FCallout.CalloutPeakOffset := CalloutPeakOffsetSpinBox.Value; 137 | end; 138 | 139 | procedure TForm1.TopSBClick(Sender: TObject); 140 | begin 141 | if Sender = TopSB then 142 | FCallout.CalloutPosition := TCalloutPosition.Top; 143 | if Sender = BottomSB then 144 | FCallout.CalloutPosition := TCalloutPosition.Bottom; 145 | if Sender = LeftSB then 146 | FCallout.CalloutPosition := TCalloutPosition.Left; 147 | if Sender = RightSB then 148 | FCallout.CalloutPosition := TCalloutPosition.Right; 149 | end; 150 | 151 | procedure TForm1.FillColorCBChange(Sender: TObject); 152 | begin 153 | FCallout.Fill.Color := FillColorCB.Color; 154 | end; 155 | 156 | procedure TForm1.StrokeColorCBChange(Sender: TObject); 157 | begin 158 | FCallout.Stroke.Color := StrokeColorCB.Color; 159 | end; 160 | 161 | procedure TForm1.ThicknessSpinBoxChangeTracking(Sender: TObject); 162 | var 163 | s: Single; 164 | begin 165 | FCallout.Stroke.Thickness := ThicknessSpinBox.Value; 166 | 167 | s := ThicknessSpinBox.Value / 2; 168 | Selection1.Padding.Rect := RectF(s, s * 2, s, s); 169 | end; 170 | 171 | end. 172 | -------------------------------------------------------------------------------- /Demo/TestCallout/info.plist.TemplateOSX.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | <%VersionInfoPListKeys%> 6 | <%ExtraInfoPListKeys%> 7 | 8 | 9 | -------------------------------------------------------------------------------- /Demo/TestINativeCanvas/AndroidManifest.template.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | 10 | 11 | <%uses-permission%> 12 | 13 | 21 | 22 | <%application-meta-data%> 23 | <%services%> 24 | 26 | 30 | 31 | 33 | 34 | 35 | 36 | 37 | 38 | <%activity%> 39 | <%receivers%> 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /Demo/TestINativeCanvas/Entitlement.TemplateOSX32.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | <%appSandboxKeys%> 6 | 7 | 8 | -------------------------------------------------------------------------------- /Demo/TestINativeCanvas/Entitlement.TemplateiOS.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | <%getTaskAllowKey%> 6 | <%applicationIdentifier%> 7 | <%pushNotificationKey%> 8 | <%keychainAccessGroups%> 9 | 10 | 11 | -------------------------------------------------------------------------------- /Demo/TestINativeCanvas/TestINativeCanvas.dpr: -------------------------------------------------------------------------------- 1 | program TestINativeCanvas; 2 | 3 | uses 4 | System.StartUpCopy, 5 | FMX.Forms, 6 | TestINativeCanvasMain in 'TestINativeCanvasMain.pas' {TestDrawBitmapMainForm}, 7 | FMX.Graphics.NativeCanvas in '..\..\ComponentsSource\FMX.Graphics.NativeCanvas.pas'; 8 | 9 | {$R *.res} 10 | 11 | begin 12 | Application.Initialize; 13 | Application.CreateForm(TTestDrawBitmapMainForm, TestDrawBitmapMainForm); 14 | Application.Run; 15 | end. 16 | -------------------------------------------------------------------------------- /Demo/TestINativeCanvas/TestINativeCanvasMain.fmx: -------------------------------------------------------------------------------- 1 | object TestDrawBitmapMainForm: TTestDrawBitmapMainForm 2 | Left = 0 3 | Top = 0 4 | Caption = 'Form10' 5 | ClientHeight = 653 6 | ClientWidth = 513 7 | FormFactor.Width = 320 8 | FormFactor.Height = 480 9 | FormFactor.Devices = [Desktop] 10 | DesignerMasterStyle = 2 11 | object Image1: TImage 12 | MultiResBitmap.Height = 128 13 | MultiResBitmap.Width = 128 14 | MultiResBitmap = < 15 | item 16 | Width = 38 17 | Height = 52 18 | PNG = { 19 | 89504E470D0A1A0A0000000D4948445200000026000000340806000000E6234A 20 | 3E000000017352474200AECE1CE90000000467414D410000B18F0BFC61050000 21 | 0B1D494441546843C559797055D519FFDDB76579210B90453098040C100C8B01 22 | 59C3269B1002742C8A4C95E28C15198AD5A92DF047B483B4D30E165AB1CB8C0C 23 | 2A88A8C39A0282848440106A4220241004920089420809216FDFFA7DE7DEFB72 24 | DF23210BCCF437F371EEF9EEB9E7FCCEEFFBCEF7EE0D12BA815C20C10364FB80 25 | 0CEAA6D324266A878B9B4029F99DD49691BF580FECCD027E926F751E9D26F625 26 | 1041ABBF4697CF1B248C351B81101D31A2957992106A190E624CC4E0A4D6E105 27 | 2C2EC0EDC349727D4D6CFFBD106811033B40A788ED019651B336DA849E4C2854 28 | 21D159D88924136C72E20E7573E6011FCA77DAC7038911A101D46C8B34E11932 29 | 9848A1878193146C26D9C88AA9FB2211BC2CDFB91FED122352B3A8F9AA572822 30 | A238831E21EE12B906BB08E9CF89DC41D91B883689ED025E20713E8D0F8729DC 31 | A03883A08F8C42C494E988983A1D865EB13026F6137ED7F56B7037D4A325EF30 32 | 5A8E1E86A7F9AEF007C3EA066E5A85882F2F0076286E3FEE23464A4DA72637C1 33 | 0C535BB9143A280DF1ABDF4364D60248FA07279BCFE34173EE2EDC5C9703FBC5 34 | 0AC5DB0ACEBD9F2CE204CF0B562E8018914AA6E64C6C38A28295D29923D067DD 35 | 7AC4FCE2D50E09058309367EF631EA56BF0DAF25F050DA48B95B56B0AC23B539 36 | E72746E5401F029C8A09410627BA16C6C7FB21F9CB5C840E49573CDD83BDBC0C 37 | 550BB3E0BA714DF1C8E003D1E840B103184DE584742421C41D02558117A81464 38 | F420525C8754333E918C0179A71042A454DF954D1BD074AE3460DC83FCAAF11C 39 | 3C17CFA9F5F39ABC3673A0AE80508CD4E23A79B14F3892D542C9D08585E1C923 40 | A70294BA5D988FA2E7A6C018158DE76A1B152F9D342254306E04C29F48C2B4F2 41 | 2AC5DB3658B91F9E1D0DAFCDA678E4C25C67451535834835A7C8240AE16B54D6 42 | 93991DEF40459FF51F21248D94D238AF6FFD44B429CBDF0CF05FDDB451B40622 43 | 5CB9EE3D711D8CD45539A2E53979EEEB6FFC52F419BC3615F0E416A7F875F950 44 | 2846495F1E6F469A415340C3D2872335FFFB8044B75EABC69121C908EF978489 45 | 4567846A8C66566BFC0871FD20CCBDD7BA133E1097268F84ADAC54F1D04F17D5 46 | 8E9B1654D02118A2A39A956ED4214D4FA4F831D5E257D1AE757AA18A6AA5AFCB 47 | 3B7C92767EF76C298A664F21A536E0FCEF7F23FC8C89C7CF20ABD9E7B7D455EF 48 | 0A7FE4D0E10173F1DCBC065FAAC61C980B739276036F5118D747523C5598E814 49 | 0E2EBD12A05603E5D67773A68A05328F97886BF6B16AAEBB4D0823156DA4A87A 50 | 5FFB0C8F19F39F3C714F0B56EDC2F0FE706A4E69331D4D0AE7DB3A8AE504A392 51 | 5BAAF5983127402D675313CE2E5BCACF217ECE3CA1122FCA6052BC70C6E73B11 52 | 9F355F8495C7F261287EE96762CCE03F7E801E941A5AC5D8780D5E8B2F55632E 53 | CC49E2FCEA15945F491F6F47CC02FFC9154A1C4D4F517AADC8D8B613774E1C43 54 | 8FA786E2F1C54B04C953A450B3266F867EB459DC6B0F8DBB76A0FAD5454A4FCE 55 | B3060B2A994E5F964DCBDA943C206067A18949189D9B272C7ECE7C1A01F49C30 56 | 1971743D68DD07E8FBD21231CE45CAF2A954A11E0EED5CC126D6E2318A311742 57 | 022BE68B8D101D3F869CAB1679160C56AE28F369713DAEB044E415E3CEF17CD4 58 | 7EFE29D916D167D29114BAEA7F6C107D1EC71B8A9B932DEE69C1F9553E549E47 59 | 453DFD6A89006A190BA37FDAB2B237968A703DB16CA550519489A129389D3555 60 | 90E24547EDCB13369094E4967DBC2126C9E3F899FBE60E5A9FC18A5963221026 61 | 2B2823ADF02CC2A8086A7171F55BA85114E0D0F1629C4BAC0C2BD267D1CBC277 62 | 6BFF5EF41C3F5184595594FD75DB3FA1B6064F6DDA2C7C2A6C1565A8C81CA6F4 63 | 64628D2DB0493B819A9E66F453622BD07FDB6E44CFCA567A32BE9F3B55844C05 64 | 2FCA36925451717EF952D429E164F04964C2BC116DEE69D174702FAE2C96F396 65 | E12566772CB8C67C2A3D7412B452B69CFEEE3EB9137FF56B0CFB6C27C6149460 66 | FA1D2F26945E45C6DEBC8031433EDC2CFC03DF97CBC33D52B49294AEDDB62560 67 | 9CD62CA525016B3317E6C4A15C1B6AC29A10CDAB4EF8B00CA41DF9AFD26B1B8D 68 | A41E2FCC0444FF44016267CFF3F7197CBF7EFF1E3CB6E8157F588351F1EC2858 69 | CFF227800C07BD02D99D785FDA4BC58CEA5CA1394CB9A360C8F1F3081B9826AE 70 | DD94F08D27F2C98E89C5F85A45CAEF72F0A3C89F6AD1E790C5CD9E4F24B31133 71 | 7E72BB2164D82E94A17C626B7E31ACF4C2E1F6E059895F10E93DE846A4996A87 72 | 26CF7ABFF80A92FE2E27AA9D163D31A2BFB8E68562C64F12CA4453CBD732F102 73 | A10E1BF755B08A3C86DBD020D5AA572CC5ED2FE4B7150687F69E05F524DA6382 74 | 0A85F3CF46237E6BD284937F27077F7312660A2BE3FA3F372282C8F0221D81C9 75 | DD3E104872C49EBC8067ADE74B5131ED19F17BA9C2498C5C2EFC85DE2EDE11C4 76 | F6D3C6E87BF46A583822B4AA8552554E237286989E8AA7EB6072AC78E2EB2B15 77 | 0F85AAF10E2A668E85BDAAF5B392D5B259D142D14B994D8FF969D05BC61A526D 78 | AD31E87D3F6AD234A47EB1BFCB1F20ED8115AA5C3813CD8547158F0C97AC560E 79 | 158E3F70DFFFD34DFE8D0E176ADDF4D5A23DBE4D05DFE2D2E2B9F0047DDD7407 80 | 3C07CF75974869D7E035796DE2F0018F63680207D0099D44030F99C26092346F 81 | 1B8CF0C1E97872CBD722BCDD0187ED8725CFC34A27510B1FD52DA70D4E223283 82 | 4A7A81E26E558CA1DC58E1A684D3EE88CD42139E1D9786AA7796C375BBFEFE01 83 | ED188FE567F8599E237808AF4558A125C508504C059DD20D3A23564AF4A912AC 84 | 1C43A2448C9E3C0D3133B31131F469FFC95561A182D972AE048DDFEC4553FEB7 85 | F07102058358798914D9463A856F2A5E3FDA24C6A0C3B0926EAED785422F3D9A 86 | BCF7C34715C2C7B9ECC69F88D42AC51D8036F49041A783BFC7B2BC76B4F0CE82 87 | 43D05D132AF19C6E2C2AC9C95943AE36C569573115A4DC40CACF230623FAF2E7 88 | FA438137E842DD3DB379D6D6CCCC4B8A57A0BEBEDE5B5C5C4C3A0AFE1D1363D0 89 | 69ED4773E613B9E46E9363526EA9A62E3A3AEB6066668DE20D80D7EBF5E4E6E6 90 | F2E7B9AF53C418FBE8FD9052385F6FC200B4F337B376C13AB8A49AF2BE7DB3F2 91 | 060EFC5176B68DA6A6A66652CED56E8E05632E50DB623265D302F5BC5070EEB0 92 | 79ACB004FB14520DE509098B8B860D6B0CED0029292942AC2E9DB79629535C11 93 | 0E4749D4DD966CFA850A09D09B58783C92436740889A201225A7CB2959AFC6C7 94 | 2FCD1F3EFC8ACFE7333CC8DC6EB76DDFBE7DCDFC6C9788A5A6A6A23A2E4E9FD8 95 | D0501769B3CFF00685D4E8965CE433A9C4749457B722A37372478C38490B1BDB 96 | 3322A427341E3A74E8B6FC6417895DBE7CD93368D020F7F9B8B8E6B41BB5B121 97 | 6ECF60AF66069D5B72AAC4F49490367DC8FE6D63C66C6E8B8C6A44C82549520D 98 | 916A7D89236883D1694C9A34A97794CF97FECA89135B60F0F413E428943ABB64 99 | F186FACC3A0A21DCFADA6D63C72E6932991CE2A120E8743A17A1BAA0A0A0CDFF 100 | 35E992622A6A6A6AAC7DFBF7B745DAED88BB776FAA47092929264269A0105EEE 101 | 1DF7B7B28484EBE4E602E33722A4F7783C37A834541029914F6DA15BC4185555 102 | 55168C1A7565D88DDA99468F278E0F82D723B9F5128C369FFEC257A3466DA510 103 | 19B546646E9ACDE692C3870FDFA4CDB1AEEDA25BA1D4627D6CECAC9486FA034E 104 | 7EC174485693E40B3F9994F2EEA9C4C44A79840045D4C4846E29FD0EF1D0C418 105 | DB8DC6EFF53A5786C129D9EC3A5DEDBF264C785FB9C5D5BCA2B0B090BF054559 106 | EB2C3A5D601F04DADD5F0D5C480997E2E28E1399503A71264AEE9344EA34B9BB 107 | 448AF14888D1F9FAC2EBD3353AF47AEBB1A4A4F3448C0BE681A2A2226D38BB84 108 | 47428CFFD3C06E301CBC191E5EE1D0E93CA4D46E528A4F64B7F1488831DC3EDF 109 | EECA5EBD2AA88AEF3E7DFAF40DC5FDFFC70E206CE2C8911DFF4DBD5300FE07BB 110 | 3E63863BF8D8B90000000049454E44AE426082} 111 | FileName = 'C:\Users\zhaoyipeng\Pictures\circle1.jpg' 112 | end> 113 | Align = Bottom 114 | Position.Y = 584.000000000000000000 115 | Size.Width = 513.000000000000000000 116 | Size.Height = 69.000000000000000000 117 | Size.PlatformDefault = False 118 | end 119 | object PaintBox1: TPaintBox 120 | Align = Client 121 | Size.Width = 513.000000000000000000 122 | Size.Height = 487.000000000000000000 123 | Size.PlatformDefault = False 124 | OnPaint = PaintBox1Paint 125 | end 126 | object Layout1: TLayout 127 | Align = Top 128 | Size.Width = 513.000000000000000000 129 | Size.Height = 97.000000000000000000 130 | Size.PlatformDefault = False 131 | TabOrder = 2 132 | object BitmapOpacitySpinBox: TSpinBox 133 | Touch.InteractiveGestures = [LongTap, DoubleTap] 134 | TabOrder = 0 135 | Cursor = crIBeam 136 | Max = 255.000000000000000000 137 | Value = 128.000000000000000000 138 | Position.X = 176.000000000000000000 139 | Position.Y = 16.000000000000000000 140 | Size.Width = 185.000000000000000000 141 | Size.Height = 30.000000000000000000 142 | Size.PlatformDefault = False 143 | OnChangeTracking = BitmapOpacitySpinBoxChangeTracking 144 | object Label3: TLabel 145 | Position.X = -160.000000000000000000 146 | Size.Width = 125.000000000000000000 147 | Size.Height = 25.000000000000000000 148 | Size.PlatformDefault = False 149 | TextSettings.HorzAlign = Trailing 150 | Text = 'Opacity' 151 | end 152 | end 153 | object NativeDrawSwitch: TSwitch 154 | IsChecked = True 155 | Position.X = 231.000000000000000000 156 | Position.Y = 55.000000000000000000 157 | Size.Width = 55.000000000000000000 158 | Size.Height = 35.000000000000000000 159 | Size.PlatformDefault = False 160 | TabOrder = 13 161 | OnSwitch = NativeDrawSwitchSwitch 162 | object Label2: TLabel 163 | Position.X = -162.000000000000000000 164 | Position.Y = 1.000000000000000000 165 | Size.Width = 125.000000000000000000 166 | Size.Height = 25.000000000000000000 167 | Size.PlatformDefault = False 168 | TextSettings.HorzAlign = Trailing 169 | Text = 'NativeDraw' 170 | TabOrder = 0 171 | end 172 | end 173 | end 174 | end 175 | -------------------------------------------------------------------------------- /Demo/TestINativeCanvas/TestINativeCanvasMain.pas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhaoyipeng/FMXComponents/f7d75d6776040f68c840c1724ce694bcf911979d/Demo/TestINativeCanvas/TestINativeCanvasMain.pas -------------------------------------------------------------------------------- /Demo/TestINativeCanvas/info.plist.TemplateOSX.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | <%VersionInfoPListKeys%> 6 | <%ExtraInfoPListKeys%> 7 | 8 | 9 | -------------------------------------------------------------------------------- /Demo/TestINativeCanvas/info.plist.TemplateiOS.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | <%VersionInfoPListKeys%> 6 | <%ExtraInfoPListKeys%> 7 | 8 | 9 | -------------------------------------------------------------------------------- /Demo/TestLoadingIndicator/.gitignore: -------------------------------------------------------------------------------- 1 | /__history 2 | /Win32 3 | /TestLoadingIndicator.res 4 | -------------------------------------------------------------------------------- /Demo/TestLoadingIndicator/LoadingIndicatorDemoMain.fmx: -------------------------------------------------------------------------------- 1 | object LoadingIndicatorDemoMainForm: TLoadingIndicatorDemoMainForm 2 | Left = 0 3 | Top = 0 4 | Caption = 'Form35' 5 | ClientHeight = 469 6 | ClientWidth = 353 7 | FormFactor.Width = 320 8 | FormFactor.Height = 480 9 | FormFactor.Devices = [Desktop] 10 | DesignerMasterStyle = 0 11 | object FMXLoadingIndicator1: TFMXLoadingIndicator 12 | Position.X = 80.000000000000000000 13 | Position.Y = 184.000000000000000000 14 | Size.Width = 81.000000000000000000 15 | Size.Height = 57.000000000000000000 16 | Size.PlatformDefault = False 17 | TabOrder = 1 18 | Active = False 19 | Color = xFF1282B2 20 | Kind = ArcsRing 21 | end 22 | object Button1: TButton 23 | Position.X = 72.000000000000000000 24 | Position.Y = 32.000000000000000000 25 | TabOrder = 2 26 | Text = 'Start/Stop' 27 | OnClick = Button1Click 28 | end 29 | object FMXLoadingIndicator2: TFMXLoadingIndicator 30 | HitTest = True 31 | Position.X = 176.000000000000000000 32 | Position.Y = 184.000000000000000000 33 | Size.Width = 81.000000000000000000 34 | Size.Height = 57.000000000000000000 35 | Size.PlatformDefault = False 36 | TabOrder = 0 37 | OnClick = FMXLoadingIndicator2Click 38 | Color = xFF1282B2 39 | Kind = ArcsRing 40 | end 41 | object Memo1: TMemo 42 | Touch.InteractiveGestures = [Pan, LongTap, DoubleTap] 43 | DataDetectorTypes = [] 44 | Position.X = 16.000000000000000000 45 | Position.Y = 288.000000000000000000 46 | Size.Width = 313.000000000000000000 47 | Size.Height = 177.000000000000000000 48 | Size.PlatformDefault = False 49 | TabOrder = 3 50 | Viewport.Width = 309.000000000000000000 51 | Viewport.Height = 173.000000000000000000 52 | end 53 | end 54 | -------------------------------------------------------------------------------- /Demo/TestLoadingIndicator/LoadingIndicatorDemoMain.pas: -------------------------------------------------------------------------------- 1 | unit LoadingIndicatorDemoMain; 2 | 3 | interface 4 | 5 | uses 6 | System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants, 7 | FMX.Types, FMX.Controls, FMX.Forms, FMX.Graphics, FMX.Dialogs, 8 | FMX.Controls.Presentation, FMX.StdCtrls, FMX.Layouts, FMX.LoadingIndicator, 9 | FMX.ScrollBox, FMX.Memo; 10 | 11 | type 12 | TLoadingIndicatorDemoMainForm = class(TForm) 13 | FMXLoadingIndicator1: TFMXLoadingIndicator; 14 | Button1: TButton; 15 | FMXLoadingIndicator2: TFMXLoadingIndicator; 16 | Memo1: TMemo; 17 | procedure Button1Click(Sender: TObject); 18 | procedure FMXLoadingIndicator2Click(Sender: TObject); 19 | private 20 | { Private declarations } 21 | public 22 | { Public declarations } 23 | end; 24 | 25 | var 26 | LoadingIndicatorDemoMainForm: TLoadingIndicatorDemoMainForm; 27 | 28 | implementation 29 | 30 | {$R *.fmx} 31 | 32 | procedure TLoadingIndicatorDemoMainForm.Button1Click(Sender: TObject); 33 | begin 34 | FMXLoadingIndicator1.Active := not FMXLoadingIndicator1.Active; 35 | FMXLoadingIndicator2.Active := not FMXLoadingIndicator2.Active; 36 | end; 37 | 38 | procedure TLoadingIndicatorDemoMainForm.FMXLoadingIndicator2Click( 39 | Sender: TObject); 40 | begin 41 | Memo1.Lines.Add('clicked'); 42 | end; 43 | 44 | end. 45 | -------------------------------------------------------------------------------- /Demo/TestLoadingIndicator/TestLoadingIndicator.dpr: -------------------------------------------------------------------------------- 1 | program TestLoadingIndicator; 2 | 3 | uses 4 | System.StartUpCopy, 5 | FMX.Forms, 6 | LoadingIndicatorDemoMain in 'LoadingIndicatorDemoMain.pas' {Form35}; 7 | 8 | {$R *.res} 9 | 10 | begin 11 | Application.Initialize; 12 | Application.CreateForm(TLoadingIndicatorDemoMainForm, LoadingIndicatorDemoMainForm); 13 | Application.Run; 14 | end. 15 | -------------------------------------------------------------------------------- /Demo/info.plist.TemplateOSX.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | <%VersionInfoPListKeys%> 6 | <%ExtraInfoPListKeys%> 7 | 8 | 9 | -------------------------------------------------------------------------------- /Documents/BaiduMapSDK.md: -------------------------------------------------------------------------------- 1 | ## [百度地图SDK](../BaiduMapSDK/) 2 | 3 | ### 感谢 xubzhlin 的捐献
4 | BaiduMap SDK for Firemonkey
5 | 百度地图SDK 6 | -------------------------------------------------------------------------------- /Documents/FMXBezierAnimation.md: -------------------------------------------------------------------------------- 1 | ## [TFMXBezierAnimation](https://github.com/zhaoyipeng/FMXComponents/wiki/FMXBezierAnimation) 2 | 3 | ![FMXBezierAnimation](../SnapShots/FMXBezierAnimation.gif) 4 | 5 | TFMXBezierAnimation component inherit from TFloatAnimation, you can just drop a TFMXBezierAnimation component same as TFloatAnimation. 6 | 7 | use these code to set the cubic-bezier parameters 8 | ```pascal 9 | BezierAnimation1.Duration := duration; 10 | BezierAnimation1.SetData(X1, Y1, X2, Y2); 11 | BezierAnimation1.Start; 12 | ``` 13 | 14 | This is the interface of TBezier 15 | ```pascal 16 | TBezier = class 17 | public 18 | constructor Create(p1x, p1y, p2x, p2y: Double); 19 | procedure SetData(p1x, p1y, p2x, p2y: Double); 20 | function SampleCurveX(t: Double): Double; 21 | function SampleCurveY(t: Double): Double; 22 | function SampleCurveDerivativeX(t: Double): Double; 23 | function SolveCurveX(x, epsilon: Double): Double; 24 | function Solve(x, epsilon: Double): Double; 25 | class function GetLinear: TBezier; 26 | class function GetEase: TBezier; 27 | class function GetEaseIn: TBezier; 28 | class function GetEaseOut: TBezier; 29 | class function GetEaseInOut: TBezier; 30 | end; 31 | ``` 32 | 33 | there are 5 predefined bezier curves, linear, ease, ease-in, ease-out, ease-in-out, you can call corresponding class function to get the curve. 34 | 35 | ```pascal 36 | Ani := TBezier.GetEaseInOut; 37 | BezierAnimation1.SetBezier(Ani); 38 | ``` 39 | 40 | or you can defined your curve 41 | 42 | ```pascal 43 | Ani := TBezier.Create(p1x, p1y, p2x, p2y); 44 | ``` 45 | -------------------------------------------------------------------------------- /Documents/FMXCalendarControl.md: -------------------------------------------------------------------------------- 1 | ## TFMXCalendarControl 2 | 3 | ![TFMXCalendarControl](../SnapShots/FMXCalendarControl.gif) 4 | 5 | A calendar component like iOS style 6 | 7 | 类似iOS风格的日期控件 8 | 9 | 感谢 xubzhlin 的支持,原始控件来自于FMX-UI-Controls项目,经作者同意由 谢顿 收集整理 10 | 原项目地址为:https://github.com/xubzhlin/FMX-UI-Controls 11 | 12 | version history 13 | 14 | 2017-09-01, v0.1.0.0 :
15 |    first release
16 |    rename component to TFMXCalendarControl
17 |    add properties Align, Anchors, ClipChildren, ClipParent, Cursor
18 |             DragMode, EnableDragHighlight, Enabled, Height, HitTest
19 |             Locked, Padding, Opacity, Margins, PopupMenu, Position
20 |             RotationAngle, RotationCenter, Scale, Size, Visible, Width
21 |    fixed FWeekLayout and FCalenderView stored problem 22 | 23 | 2017-09-11, v0.2.0.0 :
24 |    add lunar date option -------------------------------------------------------------------------------- /Documents/FMXCallout.md: -------------------------------------------------------------------------------- 1 | ## TFMXCallout 2 | 3 | This component wrote by Aone, it's also a very good demo of the INativeCanvas. Thanks a lot to Aone. 4 | 5 | ![TFMXCallout](../SnapShots/FMXCallout.gif)
-------------------------------------------------------------------------------- /Documents/FMXCircleScoreIndicator.md: -------------------------------------------------------------------------------- 1 | ## TFMXCircleScoreIndicator 2 | 3 | ![TFMXCircleScoreIndicator](../SnapShots/FMXCircleScoreIndicator.gif) 4 | 5 | A Simple Circle Score Indicator 6 | 7 | 这是一个简单的成绩显示控件 8 |   9 | 10 | score property is Value 11 | 12 | 成绩属性为Value -------------------------------------------------------------------------------- /Documents/FMXGR32.md: -------------------------------------------------------------------------------- 1 | ## graphics32 for Firemonkey 2 | 3 | ![FMXGR32Demo](SnapShots/FMXGR32Demo.gif) 4 | 5 | Firemonkey version of Graphics32 [graphics32-for-Firemonkey](https://github.com/zhaoyipeng/graphics32-for-Firemonkey) 6 | 7 | You must download the graphics32-for-Firemonkey source code to compile demo project. -------------------------------------------------------------------------------- /Documents/FMXGR32Demo.md: -------------------------------------------------------------------------------- 1 | ## graphics32 for Firemonkey 2 | 3 | ![FMXGR32Demo](../SnapShots/FMXGR32Demo.gif) 4 | 5 | Firemonkey version of Graphics32 [graphics32-for-Firemonkey](https://github.com/zhaoyipeng/graphics32-for-Firemonkey) 6 | 7 | You must download the graphics32-for-Firemonkey source code to compile demo project. -------------------------------------------------------------------------------- /Documents/FMXGesturePassword.md: -------------------------------------------------------------------------------- 1 | ## TFMXGuesturePassword 2 | 3 | ![TFMXGuesturePassword](../SnapShots/FMXGuesturePassword.gif) 4 | 5 | A Guesture Password input Control 6 | 7 | 手势密码输入控件 8 | 9 | 感谢 xubzhlin 的支持,原始控件来自于FMX-UI-Controls项目,经作者同意由 谢顿 收集整理 10 | 原项目地址为:https://github.com/xubzhlin/FMX-UI-Controls 11 | 12 | version history 13 | 14 | 2017-09-06, v0.1.0.0 : 15 | 16 | first release 17 | 18 | 2017-09-07, v0.2.0.0 : 19 | 20 | fixed bugs, do not used TImage, change to internal TFixedMultiResBitmap add default draw method if the bitmap not set, if user do not want set bitmap, just drop the component onto form, it can be used 21 | 22 | 23 | 重构并修复若干缺陷,移除TImage属性,改为内部的TFixedMultiResBitmap,如果未设置图像,控件使用自绘方式显示选中状态 24 | -------------------------------------------------------------------------------- /Documents/FMXImageSlider.md: -------------------------------------------------------------------------------- 1 | ## TFMXImageSlider 2 | 3 | ![TFMXImageSlider](../SnapShots/FMXImageSlider.gif) 4 | 5 | A Simple Image Slider 6 | 7 | 一个简单的图片轮播控件 8 | 9 | 2018-01-31, v0.2.0.0 : merged with loko's change
10 | 11 | 2018-03-21, v0.3.0.0 : merged with kwon hwang-jung's change
12 | 1. add three Add methods to add bitmap directly
13 | 2. add Next, Prev methods
14 | 3. add AutoSlider property can auto slide
15 | 4. add TimerInterval to control AutoSlider interval
16 | 5. use ActivePage property move page, ex)ActivePage := 1
17 | 6. add Datas property, can set tagstring on each page
18 | 19 | 2018-03-21, v0.4.0.0 : merged with Mikkao's change 2018-03-01
20 | 1. change OnPageChange event to TPageChangeEvent
21 | 2. add OnPageAnimationFinish event
22 | 3. add OnCanDragBegin event
23 | 24 | 2018-03-21, v0.5.0.0 :
25 | 1. rewrite slide method, now can support loop
26 | 27 | 2018-03-22, v0.6.0.0 :
28 | 1. add dot indicator, support dynamic change dot active/inactive color
-------------------------------------------------------------------------------- /Documents/FMXLoadingIndicator.md: -------------------------------------------------------------------------------- 1 | ## 12.TFMXLoadingIndicator 2 | 3 | ![TFMXLoadingIndicator](../SnapShots/FMXLoadingIndicator.gif) 4 | 5 | Loading indicator port from [LoadingIndicators.WPF](https://github.com/100GPing100/LoadingIndicators.WPF) 6 | -------------------------------------------------------------------------------- /Documents/FMXQRCode.md: -------------------------------------------------------------------------------- 1 | ## TFMXQRCode 2 | 3 | ![TFMXQRCode](../SnapShots/FMXQRCode.gif) 4 | 5 | A QRCode display component
6 | use DelphiZXingQRCode to generate QRCode image
7 | 8 | -------------------------------------------------------------------------------- /Documents/FMXRatingBar.md: -------------------------------------------------------------------------------- 1 | ## TFMXRatingBar 2 | 3 | ![TFMXRatingBar](../SnapShots/FMXRatingBar.gif)
4 | 5 | ![TFMXRatingBarComponentEditor](SnapShots/FMXRatingBarED.gif)
6 | 7 | A Simple Rating BarComponent 8 | 9 | 这是一个简单的评级控件,目前只支持显示 10 |   11 | Rating property is Value 12 | 13 | 评级属性为Value -------------------------------------------------------------------------------- /Documents/FMXRotatingText.md: -------------------------------------------------------------------------------- 1 | ## TFMXRotatingText 2 | 3 | A Firemonkey Rotating Text Component be inspired by RotatingText(https://github.com/sdsmdg/RotatingText) 4 | 5 | ![FMXRotatingText](../SnapShots/FMXRotatingText.gif)
-------------------------------------------------------------------------------- /Documents/FMXScrollableList.md: -------------------------------------------------------------------------------- 1 | ## TFMXScrollableList 2 | 3 | ![TFMXScrollYears](../SnapShots/FMXScrollableList.gif) 4 | 5 | A Simple Firemonkey Scrolleable List Component 6 | 7 | 这是一个简单的滚动列表控件,可以用于选择年份或其它信息 8 |   9 | 选项使用 Items 属性 -------------------------------------------------------------------------------- /Documents/FMXSeg7Shape.md: -------------------------------------------------------------------------------- 1 | ## TFMXSeg7Shape 2 | 3 | Segment 7 Shape Firemonkey Componet create by Yamasho 4 | 5 | ![Seg7ShapeFmx](../SnapShots/FMXSeg7Shape.gif) 6 | 7 | 七段式数字显示控件 8 | 9 | 原始项目地址为: 10 | https://github.com/qa65000/Seg7ShapeFmx -------------------------------------------------------------------------------- /Documents/FMXSimpleBBCodeText.md: -------------------------------------------------------------------------------- 1 | ## TFMXSimpleBBCodeText 2 | 3 | ![TFMXSimpleBBCodeText](../SnapShots/FMXSimpleBBCodeText.gif) 4 | 5 | A Simple BBCode Text Display Control 6 | 7 | 一个简单的BBCode显示控件,实现简单的富文本显示 8 | 9 | 感谢 龟山Aone 的提示,TFMXSimpleBBCodeText性能得到了极大地优化,基本达到实用程度 -------------------------------------------------------------------------------- /Documents/FMXToast.md: -------------------------------------------------------------------------------- 1 | ## TFMXToast 2 | 3 | ![TFMXToast](../SnapShots/FMXToast.gif) 4 | 5 | TFMXToast is a toast component using pure fmx
6 | 使用纯FMX的Toast控件
7 | 参考了Aone的文章:http://www.cnblogs.com/onechen/p/7130227.html
-------------------------------------------------------------------------------- /Documents/INativeCanvas.md: -------------------------------------------------------------------------------- 1 | ## INativeCanvas 2 | 3 | We know the firemonkey's canvas is very bad quality on mobile platforms
4 | ![FiremonkeyCanvas](../SnapShots/FiremonkeyCanvas.png)
5 | 6 | After Aone's hard work we can use native method drawing the graph, you can get same quality as native mobile platform, Aone's method is using helper class to TCanvas, you must static decide use native or firemonkey to draw graph, I changed it to a INativeCanvas interface, you can change the method at runtime. 7 | 8 | ![INativeCanvas](../SnapShots/INativeCanvas.png)
9 | 10 | this is the compare of Firemonkey Canvas and INativeCanvas FillText method
11 | 12 | ![iOSFMXCanvas](../SnapShots/iOSFMXCanvas.png)
13 | ![iOSNativeCanvas](../SnapShots/iOSNativeCanvas.png)
14 | 15 | 16 | All you need is add several lines. 17 | 18 | ```pascal 19 | procedure TFMXCallout.Paint; 20 | var 21 | Canvas: INativeCanvas; 22 | Method: TDrawMethod; 23 | begin 24 | if Self.NativeDraw then 25 | Method := TDrawMethod.Native 26 | else 27 | Method := TDrawMethod.Firemonkey; 28 | Canvas := Self.Canvas.ToNativeCanvas(Method); 29 | 30 | Canvas.NativeDraw(LocalRect, procedure begin // 原生繪圖 by Aone, 暱名函數裡加入繪圖方法, 內部會先畫到 Bitmap 31 | Canvas.FillPath(FFillPath, AbsoluteOpacity, Fill); 32 | Canvas.DrawPath(FPath, AbsoluteOpacity, Stroke); 33 | end); // 原生繪圖 by Aone, 結束後會顯示這個 Bitmap 34 | end; 35 | ``` -------------------------------------------------------------------------------- /Documents/PhotoCorrect.md: -------------------------------------------------------------------------------- 1 | ## PhotoCorrect 2 | 3 | ![FMXGR32Demo2](../SnapShots/FMXGR32Demo2.gif) 4 | 5 | I have not much time, so this release just source code, not component yet.
6 | 最近时间不多,没有封装成控件,先发布了实现源码。
7 | -------------------------------------------------------------------------------- /FMXComponentsGroup.groupproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | {78B8492E-97DC-4DC9-90F3-CB93823FB4CB} 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | Default.Personality.12 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | -------------------------------------------------------------------------------- /HISTORY.md: -------------------------------------------------------------------------------- 1 | ## 2017-11-22 2 | 3 | Fixed TFMXLoadingIndicator. When change the Visible property to false, stop the animation, when the property is true start the animation. 4 | 5 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 Zhao Yipeng 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # FMXComponents 2 | 3 | Main site: https://github.com/zhaoyipeng/FMXComponents
4 | Mirror site: https://gitee.com/zhaoyipeng/FMXComponents
5 | 6 | Please "star" (like) this project in GitHub! It's cost nothing but help to reference the code 7 | 8 | This project includes the components that donors and I have actually used in applications.
9 | If you have some components want to add into this project, you can send it to zhaoyipeng@hotmail.com 10 | 11 | 本项目包括本人及捐赠人实际应用中使用的控件 12 | 13 | 技术支持QQ群: 513799640
14 | Support QQ Group: 513799640
15 | ![FMXComponents](SnapShots/group_qrcode.jpg)
16 | You can also add my skype: zhaoyipeng@hotmail.com
17 | 18 | ## Recent update 19 | 20 | ![Recent update](SnapShots/FMXImageSlider.gif)
21 | 22 | v0.4.0.0 : merged with Mikkao's change 2018-03-01
23 | 1. change OnPageChange event to TPageChangeEvent
24 | 2. add OnPageAnimationFinish event
25 | 3. add OnCanDragBegin event
26 | 27 | v0.5.0.0 :
28 | 1. rewrite slide method, now can support loop
29 | 30 | v0.6.0.0 :
31 | 1. add dot indicator, support dynamic change dot active/inactive color
32 | 33 | 34 | ## 1.[TFMXScrollableList](Documents/FMXScrollableList.md) 35 | 36 | ## 2.[TFMXRatingBar](Documents/FMXRatingBar.md) 37 | 38 | ## 3.[TFMXCircleScoreIndicator](Documents/FMXCircleScoreIndicator.md) 39 | 40 | ## 4.[TFMXImageSlider](Documents/FMXImageSlider.md) 41 | 42 | ## 5.[TFMXSimpleBBCodeText](Documents/FMXSimpleBBCodeText.md) 43 | 44 | ## 6.[TFMXGuesturePassword](Documents/FMXGesturePassword.md) 45 | 46 | ## 7.[TFMXCalendarControl](Documents/FMXCalendarControl.md) 47 | 48 | ## 8.[BaiduMapSDK](Documents/BaiduMapSDK.md) 49 | 50 | ## 9.[TFMXSeg7Shape](Documents/FMXSeg7Shape.md) 51 | 52 | ## 10.[TFMXToast](Documents/FMXToast.md) 53 | 54 | ## 11.[TFMXQRCode](Documents/FMXQRCode.md) 55 | 56 | ## 12.[TFMXLoadingIndicator](Documents/FMXLoadingIndicator.md) 57 | 58 | ## 13.[graphics32 for Firemonkey](Documents/FMXGR32.md) 59 | 60 | ## 14.[TFMXCallout](Documents/FMXCallout.md) 61 | 62 | ## 15.[INativeCanvas](Documents/INativeCanvas.md) 63 | 64 | ## 16.[TFMXRotatingText](Documents/FMXRotatingText.md) 65 | 66 | ## 17.[PhotoCorrect](Documents/PhotoCorrect.md) 67 | 68 | ## 18.[TFMXBezierAnimation](Documents/FMXBezierAnimation.md) 69 | 70 | ## License 71 | 72 | The FMXComponents is open-sourced software licensed under the [MIT License](LICENSE). 73 | 74 | 75 | # Site Links 76 | 77 | ## [learndelphi](//learndelphi.org) 78 | 79 | ## [embarcadero](//embarcadero.com) 80 | -------------------------------------------------------------------------------- /SnapShots/FMXBezierAnimation.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhaoyipeng/FMXComponents/f7d75d6776040f68c840c1724ce694bcf911979d/SnapShots/FMXBezierAnimation.gif -------------------------------------------------------------------------------- /SnapShots/FMXCalendarControl.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhaoyipeng/FMXComponents/f7d75d6776040f68c840c1724ce694bcf911979d/SnapShots/FMXCalendarControl.gif -------------------------------------------------------------------------------- /SnapShots/FMXCallout.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhaoyipeng/FMXComponents/f7d75d6776040f68c840c1724ce694bcf911979d/SnapShots/FMXCallout.gif -------------------------------------------------------------------------------- /SnapShots/FMXCircleScoreIndicator.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhaoyipeng/FMXComponents/f7d75d6776040f68c840c1724ce694bcf911979d/SnapShots/FMXCircleScoreIndicator.gif -------------------------------------------------------------------------------- /SnapShots/FMXGR32Demo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhaoyipeng/FMXComponents/f7d75d6776040f68c840c1724ce694bcf911979d/SnapShots/FMXGR32Demo.gif -------------------------------------------------------------------------------- /SnapShots/FMXGR32Demo2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhaoyipeng/FMXComponents/f7d75d6776040f68c840c1724ce694bcf911979d/SnapShots/FMXGR32Demo2.gif -------------------------------------------------------------------------------- /SnapShots/FMXGuesturePassword.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhaoyipeng/FMXComponents/f7d75d6776040f68c840c1724ce694bcf911979d/SnapShots/FMXGuesturePassword.gif -------------------------------------------------------------------------------- /SnapShots/FMXImageSlider.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhaoyipeng/FMXComponents/f7d75d6776040f68c840c1724ce694bcf911979d/SnapShots/FMXImageSlider.gif -------------------------------------------------------------------------------- /SnapShots/FMXLoadingIndicator.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhaoyipeng/FMXComponents/f7d75d6776040f68c840c1724ce694bcf911979d/SnapShots/FMXLoadingIndicator.gif -------------------------------------------------------------------------------- /SnapShots/FMXQRCode.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhaoyipeng/FMXComponents/f7d75d6776040f68c840c1724ce694bcf911979d/SnapShots/FMXQRCode.gif -------------------------------------------------------------------------------- /SnapShots/FMXRatingBar.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhaoyipeng/FMXComponents/f7d75d6776040f68c840c1724ce694bcf911979d/SnapShots/FMXRatingBar.gif -------------------------------------------------------------------------------- /SnapShots/FMXRatingBarED.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhaoyipeng/FMXComponents/f7d75d6776040f68c840c1724ce694bcf911979d/SnapShots/FMXRatingBarED.gif -------------------------------------------------------------------------------- /SnapShots/FMXRotatingText.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhaoyipeng/FMXComponents/f7d75d6776040f68c840c1724ce694bcf911979d/SnapShots/FMXRotatingText.gif -------------------------------------------------------------------------------- /SnapShots/FMXScrollableList.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhaoyipeng/FMXComponents/f7d75d6776040f68c840c1724ce694bcf911979d/SnapShots/FMXScrollableList.gif -------------------------------------------------------------------------------- /SnapShots/FMXSeg7Shape.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhaoyipeng/FMXComponents/f7d75d6776040f68c840c1724ce694bcf911979d/SnapShots/FMXSeg7Shape.gif -------------------------------------------------------------------------------- /SnapShots/FMXSimpleBBCodeText.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhaoyipeng/FMXComponents/f7d75d6776040f68c840c1724ce694bcf911979d/SnapShots/FMXSimpleBBCodeText.gif -------------------------------------------------------------------------------- /SnapShots/FMXSimpleBBCodeText.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhaoyipeng/FMXComponents/f7d75d6776040f68c840c1724ce694bcf911979d/SnapShots/FMXSimpleBBCodeText.png -------------------------------------------------------------------------------- /SnapShots/FMXToast.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhaoyipeng/FMXComponents/f7d75d6776040f68c840c1724ce694bcf911979d/SnapShots/FMXToast.gif -------------------------------------------------------------------------------- /SnapShots/FiremonkeyCanvas.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhaoyipeng/FMXComponents/f7d75d6776040f68c840c1724ce694bcf911979d/SnapShots/FiremonkeyCanvas.png -------------------------------------------------------------------------------- /SnapShots/INativeCanvas.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhaoyipeng/FMXComponents/f7d75d6776040f68c840c1724ce694bcf911979d/SnapShots/INativeCanvas.png -------------------------------------------------------------------------------- /SnapShots/group_qrcode.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhaoyipeng/FMXComponents/f7d75d6776040f68c840c1724ce694bcf911979d/SnapShots/group_qrcode.jpg -------------------------------------------------------------------------------- /SnapShots/iOSFMXCanvas.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhaoyipeng/FMXComponents/f7d75d6776040f68c840c1724ce694bcf911979d/SnapShots/iOSFMXCanvas.png -------------------------------------------------------------------------------- /SnapShots/iOSNativeCanvas.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhaoyipeng/FMXComponents/f7d75d6776040f68c840c1724ce694bcf911979d/SnapShots/iOSNativeCanvas.png --------------------------------------------------------------------------------