Re: [Lazarus] Cross Codebot surface drawing examples
2015-03-26 16:27 GMT-03:00 Anthony Walter : > Leonardo, > > You can absolutely use Cross Codebot to make controls, in any shape you > want. These types of controls should be graphic controls, and I provide a > bass class name TRenderGraphicControl in the Codebot.Controls unit to help > in this endeavor. > > The key to making a control any shape with TRenderGraphicControl is to > override the "protected procedure Render" method, and draw using the > "protected property Surface: ISurface". Just doing your drawing in a non > rectangular manner, for example: > > procedure TYourControl.Renderl > begin > Surface.Ellipse(ClientRect); > Surface.Fill(NewBrush(clRed)); > end; > > And you control now appears as a nice anti-aliased red ellipse bound > within the client area of your control. Obviously this is a trivial drawing > example, but if you go to the Codebot Cross forums you can find examples of > more complicated drawing. I regularly add new stock drawing functions to > the Codebot.Graphics unit, along with control theming, so if you're > interested you can reuse my some of stock routines to draw your custom > controls, or reuse the theme drawing routines. > > I hope this helps. > > > Awesome! -- The best regards, Fabio Luis Girardi PascalSCADA Project http://sourceforge.net/projects/pascalscada http://www.pascalscada.com -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Cross Codebot surface drawing examples
Leonardo, You can absolutely use Cross Codebot to make controls, in any shape you want. These types of controls should be graphic controls, and I provide a bass class name TRenderGraphicControl in the Codebot.Controls unit to help in this endeavor. The key to making a control any shape with TRenderGraphicControl is to override the "protected procedure Render" method, and draw using the "protected property Surface: ISurface". Just doing your drawing in a non rectangular manner, for example: procedure TYourControl.Renderl begin Surface.Ellipse(ClientRect); Surface.Fill(NewBrush(clRed)); end; And you control now appears as a nice anti-aliased red ellipse bound within the client area of your control. Obviously this is a trivial drawing example, but if you go to the Codebot Cross forums you can find examples of more complicated drawing. I regularly add new stock drawing functions to the Codebot.Graphics unit, along with control theming, so if you're interested you can reuse my some of stock routines to draw your custom controls, or reuse the theme drawing routines. I hope this helps. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Cross Codebot surface drawing examples
Cross Codebot is a set a collection of Free Pascal cross platform routines, classes, components, and controls. It uses makes prodigious of the newer Free Pascal language features, including: generics, generic interfaces, class/record helpers, records with methods, and both implicit and explicit conversion methods. Take the Cross Codebot "TRectI" record (an Integer based record) as an example. http://www.getlazarus.org/records/trecti/ It can be used in any place you might normally use a TRect. It differs in that you can change the x,y location without changing the dimensions. Additionally it can be inflated, offset, moved, or centered on a TPointI. Additionally you can retrieve any of its corners as a TPointI, it can be hit tested/empty tested, and it can be implicitly converted to a TRectF record (a Float based record). Types like TRectI are pervasive in Cross Codebot. Here is a partial listing of other types which make programing with Pascal a heck of a lot easier: TRectF TPointI TPointF TColorB TColorF THSL { Hue, Saturation, Lightness } TArray TArrayList TNamedValues TCompare TConvert TDelegate { See http://www.codebot.org/delphi/?doc=9568 } IDelegate ICloneable StringHelper = record helper for String IntegerHelper = record helper for Integer FloatHelper = record helper for Float TDateTimeHelper = record helper for TDateTime TColorHelper = record helper for TColor TControlHelper = class helper for TControl And so on. As previously mentioned in this mailing list, my string handling routines are blazingly fast. My TextOfMobyDick.Replace('whale', 'moby', True) string replace extension method is more than 40x faster than the built in string replacement routines. Cross Codebot is also a library which implements a new advanced hardware accelerated drawing API based on an newly defined ISurface interface. This interfaces greatly simplifies access to advanced drawing techiniques { See this link for their interfaces defined http://www.getlazarus.org/videos/crossgraphics/ } Cross Codebot is also a library with new set of new Socket networking classes, providing access to basic sockets with ssl an blocking/non-blocking modes, native http client implementation, native ftp client implementation, and native cloud storage client implementation (not currently rolled in entirely yet, but working in a side projects). Cross Codebot is also a library which provides a new unified XML API based on an IDocument interface. The IFiler interface is particularly useful {See this link http://www.getlazarus.org/interfaces/xml/ } And to wrap things up (I neglected to mention a lot like the animations units, geometry units, cryptography units, and more), cross Codebot is a port of my old, but popular until I removed it, Delphi control library which was located here: http://www.codebot.org/delphi/ The old library contains nearly 180 controls now, and I plan to slowly port many of them to this new Cross Codebot library (minus the ones which are hopelessly tied to Win32). I hope this answers your question regarding what is Cross Codebot. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Cross Codebot surface drawing examples
Hi Anthony!! I use BGRABitmap to draw non-rectangular controls (like polyline) using setshape. Can I use Codebots to do that? 2015-03-26 14:17 GMT-03:00 "Leonardo M. Ramé" : > El 21/03/15 a las 01:44, Anthony Walter escibió: > > Here is a brief overview of some of custom rendering which can be done >> with Cross Codebot graphics interfaces. A few videos are embedded in the >> page below: >> >> http://www.getlazarus.org/forums/viewtopic.php?f=18&t=35&p=150#p150 >> >> Here is a listing of the interfaces and their methods: >> >> http://www.getlazarus.org/videos/crossgraphics/ >> >> If you're interested in testing the Cross Codebot package let me know >> and I can provide user level account access to my private git server. >> >> > Hi Anthony, looks nice!, congrats for the great work you are doing. > > BTW, please, include some introduction about Cross Codebot, some people > (like me) doesn't know what it is. > > > -- > Leonardo M. Ramé > http://leonardorame.blogspot.com > > > -- > ___ > Lazarus mailing list > Lazarus@lists.lazarus.freepascal.org > http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus > -- The best regards, Fabio Luis Girardi PascalSCADA Project http://sourceforge.net/projects/pascalscada http://www.pascalscada.com -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Lazarus crashes on startup with "g_object_unref: assertion 'G_IS_OBJECT (object)' failed"
On 03/26/2015 06:02 PM, Joost van der Sluis wrote: Hi all, I received a bug-report that Lazarus does not start on Fedora 22. Yeah, that version has not been released yet, so we can fix this problem before it actually occurs. ;) It was originally reported against Lazarus v1.2, but I updated to 1.4rc2 and the problem is still there. The bugreport can be found here, with a backtrace attached to it: https://bugzilla.redhat.com/show_bug.cgi?id=1203118 hattached backtrace doesn't smell good. Also what is this in backtrace ? Python Exception iter() returned non-iterator of type '_iterator': Gtk uses python now ? I'm not sure that it has something to do with lazarus. It simply smells like pango bug. Look at attached backtrace in "Comment 1". zeljko -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Cross Codebot surface drawing examples
El 21/03/15 a las 01:44, Anthony Walter escibió: Here is a brief overview of some of custom rendering which can be done with Cross Codebot graphics interfaces. A few videos are embedded in the page below: http://www.getlazarus.org/forums/viewtopic.php?f=18&t=35&p=150#p150 Here is a listing of the interfaces and their methods: http://www.getlazarus.org/videos/crossgraphics/ If you're interested in testing the Cross Codebot package let me know and I can provide user level account access to my private git server. Hi Anthony, looks nice!, congrats for the great work you are doing. BTW, please, include some introduction about Cross Codebot, some people (like me) doesn't know what it is. -- Leonardo M. Ramé http://leonardorame.blogspot.com -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] Lazarus crashes on startup with "g_object_unref: assertion 'G_IS_OBJECT (object)' failed"
Hi all, I received a bug-report that Lazarus does not start on Fedora 22. Yeah, that version has not been released yet, so we can fix this problem before it actually occurs. ;) It was originally reported against Lazarus v1.2, but I updated to 1.4rc2 and the problem is still there. The bugreport can be found here, with a backtrace attached to it: https://bugzilla.redhat.com/show_bug.cgi?id=1203118 Regards, Joost. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Lazbuild command options.
On Thu, Mar 26, 2015 at 9:47 AM, vfclists . wrote: > Is there a document with more detail on the syntax of lazbuild's options? > lazarus --help doesn't offer much. > > Web version of lazbuild --help http://wiki.freepascal.org/lazbuild Are you looking for something specific? thanks, Dmitry -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] Lazbuild command options.
Is there a document with more detail on the syntax of lazbuild's options? lazarus --help doesn't offer much. -- Frank Church === http://devblog.brahmancreations.com -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] How do you guys extract an SVN revision number from a Git commit ref?
On 26 March 2015 at 10:58, Graeme Geldenhuys wrote: > On 2015-03-26 10:42, vfclists . wrote: > > 'git svn find-rev' works for finding the Git commit refs from subversion > > refs only if the subversion refs are of the form rN, and I thought > > going the other way > > Sorry, I probably haven't had enough coffee yet, but I don't fully > understand. I thought you wanted the latest svn revision number by using > a git mirror (of a subversion repo). That is exactly what the command > does that I posted. > > For example. Here is the last commit I have in my lazarus repo (cloned > from the git mirror on Github). > === > $ git log -1 > commit d7e9b24c9bb114264663cc45d7148a4ade3f2b24 > Author: dmitry > Date: Thu Mar 26 00:48:36 2015 + > > printer4lazarus: carbon - replace OSX 10.5 (driver specific) code > with OSX 10.0 compatible code for getting printerinters DPI > > git-svn-id: http://svn.freepascal.org/svn/lazarus/trunk@48507 > 4005530d-fff6-0310-9dd1-cebe43e6787f > === > > > As far as I understood, you are interested in finding the SVN revision > of that commit - which is r48507 (by looking at the git-svn-id line. > > > === > $ git svn find-rev $(git log --max-count 1 --pretty=format:%H) > 48507 > === > > As you can see, the command returns exactly that revision for you. > > > The first time you run the 'git svn find-rev' git will do some layout > migration (svn info) for you. Maybe it is also because I'm using the > very latest Git. But after the first run, it will always only return the > svn revision number. > > Your original answer was correct. I needed something for any commit not just the latest, but the example I used was for just the latest commit, and I confused myself as a result. -- Frank Church === http://devblog.brahmancreations.com -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] How do you guys extract an SVN revision number from a Git commit ref?
On 2015-03-26 10:42, vfclists . wrote: > 'git svn find-rev' works for finding the Git commit refs from subversion > refs only if the subversion refs are of the form rN, and I thought > going the other way Sorry, I probably haven't had enough coffee yet, but I don't fully understand. I thought you wanted the latest svn revision number by using a git mirror (of a subversion repo). That is exactly what the command does that I posted. For example. Here is the last commit I have in my lazarus repo (cloned from the git mirror on Github). === $ git log -1 commit d7e9b24c9bb114264663cc45d7148a4ade3f2b24 Author: dmitry Date: Thu Mar 26 00:48:36 2015 + printer4lazarus: carbon - replace OSX 10.5 (driver specific) code with OSX 10.0 compatible code for getting printerinters DPI git-svn-id: http://svn.freepascal.org/svn/lazarus/trunk@48507 4005530d-fff6-0310-9dd1-cebe43e6787f === As far as I understood, you are interested in finding the SVN revision of that commit - which is r48507 (by looking at the git-svn-id line. === $ git svn find-rev $(git log --max-count 1 --pretty=format:%H) 48507 === As you can see, the command returns exactly that revision for you. The first time you run the 'git svn find-rev' git will do some layout migration (svn info) for you. Maybe it is also because I'm using the very latest Git. But after the first run, it will always only return the svn revision number. Regards, - Graeme - -- fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] How do you guys extract an SVN revision number from a Git commit ref?
On 03/24/2015 10:10 PM, vfclists . wrote: > > I am using this code to obtain the SVN revision of a git commit hash. > The example below is for the latest commit hence the git log -n 1. > > git log -n 1 | head -n 7 | tail -n 1 | cut -d "@" -f 2 | cut -d " " -f 1 > > It checks for the seventh line, searches for the '@' in trunk@N and > extracts it from there. > The problem is the position the line with the trunk@N string varies. > Is there some way to work it calculate it? > > My awk, grep and sed skills are not so hot. I don't know if you live in the Linux world but if so there is a software available in the Software Center called Kiki. It's used to build and test Regular Expressions, and is a learning area with a pretty good syntax explanations to try out and get used to. HTH. > > -- > Frank Church > > === > http://devblog.brahmancreations.com > > > -- > ___ > Lazarus mailing list > Lazarus@lists.lazarus.freepascal.org > http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus > -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] How do you guys extract an SVN revision number from a Git commit ref?
On 26 March 2015 at 09:46, Graeme Geldenhuys wrote: > On 2015-03-26 05:47, vfclists . wrote: > > This is what I have settled on in the mean time. > > > > LAZ_SVN_REVISION=`git log | grep -A 10 $LAZ_GIT_REVISION | grep > > git-svn-id | cut -d "@" -f 2 | cut -d " " -f 1` > > Didn't the following work for you? It extracts exactly what you want and > will work on any commit, no matter how long the commit message, and only > uses built-in git functionality. > > git svn find-rev $(git log --max-count 1 --pretty=format:%H) > > The "find-rev" needs a SHA1 value, which is what the second part of the > command (in brackets) does. So if the above command doesn't work in your > script as one command, simply split it into two. > 'git svn find-rev' works for finding the Git commit refs from subversion refs only if the subversion refs are of the form rN, and I thought going the other way, ie finding subversion refs from git refs wouldn't work as Lazarus uses N rather than expected N. I guess that is probably taken care of during the mirroring process. -- Frank Church === http://devblog.brahmancreations.com -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Is there a way to checkout a specific subversion tag or branch in a Git mirror of a Subversion repository?
On 2015-03-26 10:15, vfclists . wrote: > I am using your Git mirror :). Does it clone all the necessary details? No. I used to track some branches and tags (both for FPC and Lazarus) - but then I discovered the abuse of SubVersion usage and just gave up. At that stage it wasn't an automated setup, so was too much work for me with no real benefit. Sorry. You can always ask git to clone whatever branches directly from SubVersion. You can also tell git to limit the history (eg: start from 7 days ago), which makes the clone process magnitudes faster. If you want more details I can help you further outside the mailing list. Just send me a private email. Regards, - Graeme - -- fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Is there a way to checkout a specific subversion tag or branch in a Git mirror of a Subversion repository?
On 2015-03-26 10:02, Michael Van Canneyt wrote: > I did it once for FPC, the process ran for more than 24 hours. That is also caused by the fact that SubVersion makes complete copies of a branch when branching - hence the common statement and comparison that Git branches are cheap and instant. The HTTP protocol is also not the most efficient for this - the git:// protocol in comparison is magnitudes faster. Maybe subversion has improved in recent times, but I stopped following SubVersion development many years ago. When I initially made the FPC Git mirror on Github I decided to restrict it to the Trunk branch (I had no need for the branches). The time it takes is also dependent on your internet connection (South Africa has very slow internet), but it was done in a day during office hours. If you are converting the repo from SubVersion to Git (a permanent move), I recommend you do the above, then simply create the required branches in git and copy each checked out SubVersion branch over the Git branch. Then do a git commit which will be the diffs. Then continue development in Git from there onwards. Alternatively (more work, but keeps the SubVersion history of branches) is to clone each SubVersion branch independently, then do a sub-tree merge into the original Git (trunk) mirror. There are other solutions too, but I found the above usage the easiest to do with good results. Regards, - Graeme - -- fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Is there a way to checkout a specific subversion tag or branch in a Git mirror of a Subversion repository?
On 26 March 2015 at 09:55, Graeme Geldenhuys wrote: > On 2015-03-26 06:43, vfclists . wrote: > > Is there a way to checkout a specific subversion tag or branch in a Git > > mirror of a Subversion repository? > > If your Git mirror cloned all the details you need (trunk, branches and > tags), then yes. Simply checkout the branch you want using "git checkout > -b ". Setting up such a git mirror is quite hard though > (dependent on how SubVersion was abused) - at least it was when I last > tried to do it. > I am using your Git mirror :). Does it clone all the necessary details? -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Is there a way to checkout a specific subversion tag or branch in a Git mirror of a Subversion repository?
On Thu, 26 Mar 2015, Graeme Geldenhuys wrote: On 2015-03-26 06:43, vfclists . wrote: Is there a way to checkout a specific subversion tag or branch in a Git mirror of a Subversion repository? If your Git mirror cloned all the details you need (trunk, branches and tags), then yes. Simply checkout the branch you want using "git checkout -b ". Setting up such a git mirror is quite hard though (dependent on how SubVersion was abused) - at least it was when I last tried to do it. I did it once for FPC, the process ran for more than 24 hours. Michael. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Is there a way to checkout a specific subversion tag or branch in a Git mirror of a Subversion repository?
On 2015-03-26 06:43, vfclists . wrote: > Is there a way to checkout a specific subversion tag or branch in a Git > mirror of a Subversion repository? If your Git mirror cloned all the details you need (trunk, branches and tags), then yes. Simply checkout the branch you want using "git checkout -b ". Setting up such a git mirror is quite hard though (dependent on how SubVersion was abused) - at least it was when I last tried to do it. Some very clever git mirrors even translate SubVersion tags into Git tags. But unfortunately that processes is mostly flawed because SubVersion has no context of what a "tag" really is. To Subversion, it is just another branch. And to make matters worse, many SubVersion repos make extra commits to those tag-type branches. eg: the Lazarus and I believe the FPC project does this (or used to). In terms of Git, a tag is a pointer to one specific snapshot (commit) in a repository. Regards, - Graeme - -- fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] How do you guys extract an SVN revision number from a Git commit ref?
On 2015-03-26 05:47, vfclists . wrote: > This is what I have settled on in the mean time. > > LAZ_SVN_REVISION=`git log | grep -A 10 $LAZ_GIT_REVISION | grep > git-svn-id | cut -d "@" -f 2 | cut -d " " -f 1` Didn't the following work for you? It extracts exactly what you want and will work on any commit, no matter how long the commit message, and only uses built-in git functionality. git svn find-rev $(git log --max-count 1 --pretty=format:%H) The "find-rev" needs a SHA1 value, which is what the second part of the command (in brackets) does. So if the above command doesn't work in your script as one command, simply split it into two. SHA1 = `git log --max-count 1 --pretty=format:%H` REVISION = `git svn find-rev $SHA1` Or something like that. Regards, - Graeme - -- fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] Can't call the resource compiler
Hi all. I use ubuntu 12.04, lazarus 1.26 and fpc 2.64 (latest from site).I try to install weblaz package and rebuild lazarus. Process breaks with error mesage :...lazarus.pp(141, 1) Error: Can't call the resource compiler "/usr/bin/fpcres", switching to external mode.fpcres exists in this directory. Google can't help me, sos. Best regards,Ivan -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus