Re: [Lazarus] Color and transparancy selection ?
On 2018-03-23 08:27, Michael Van Canneyt via Lazarus wrote: > This is lazarus, after all - it should work on all supported platforms. ROFL. Sorry, I couldn't resist. ;-) Regards, Graeme -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Color and transparancy selection ?
On 23.03.2018 10:51, Michael Van Canneyt via Lazarus wrote: I need it for FPReport, meaning it must be in Lazarus itself, so I will write a minimalistic dialog that supports Alpha and include it in the report designer package. Yes, that makes sense. In Lazarus itself the same problem is solved by selecting the color and alpha channel independently: But I am aware it doesn't need to suit your needs either. Ondrej -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Color and transparancy selection ?
On Fri, 23 Mar 2018, Ondrej Pokorny via Lazarus wrote: On 23.03.2018 8:11, Michael Van Canneyt via Lazarus wrote: Since I don't want dependencies on other packages - only the LCL can be used - this is not an option... Unfortunately LCL always uses native widgets - including dialogs. Non-native and custom widgets (that are not in the VCL) are left for 3rd party vendors. The Lazarus CCR (where mbColorLib is hosted) is a good place for such 3rd party custom components. E.g. virtual tree view and fpspreadsheet are hosted there as well. I am sure you can get commit rights for it if you want to improve libraries stored there. If you like to write your own alpha channel color dialog (based on mbColorLib or not), you are welcome to host it on LazarusCCR as well. I need it for FPReport, meaning it must be in Lazarus itself, so I will write a minimalistic dialog that supports Alpha and include it in the report designer package. Michael. -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Color and transparancy selection ?
On 23.03.2018 8:11, Michael Van Canneyt via Lazarus wrote: Since I don't want dependencies on other packages - only the LCL can be used - this is not an option... Unfortunately LCL always uses native widgets - including dialogs. Non-native and custom widgets (that are not in the VCL) are left for 3rd party vendors. The Lazarus CCR (where mbColorLib is hosted) is a good place for such 3rd party custom components. E.g. virtual tree view and fpspreadsheet are hosted there as well. I am sure you can get commit rights for it if you want to improve libraries stored there. If you like to write your own alpha channel color dialog (based on mbColorLib or not), you are welcome to host it on LazarusCCR as well. Ondrej -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Color and transparancy selection ?
On 03/23/2018 10:27 AM, Michael Van Canneyt via Lazarus wrote: ported platforms. Well, Qt works on all supported desktop platforms :) Oh please, you know what I meant :) s/platforms/platforms+widgetsets/g :) Of course I know :) zeljko -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Color and transparancy selection ?
On Fri, 23 Mar 2018, zeljko wrote: On 03/23/2018 09:27 AM, Michael Van Canneyt via Lazarus wrote: On Fri, 23 Mar 2018, zeljko wrote: On 03/22/2018 08:49 PM, Michael Van Canneyt via Lazarus wrote: Hello, Is there a version of TColorDialog which allows to specify an Alpha channel ? Qt4/Qt5 ws have alpha option in standard color dialog. That's no good to me. It needs to work on all platforms, all widgetsets. This is lazarus, after all - it should work on all supported platforms. Well, Qt works on all supported desktop platforms :) Oh please, you know what I meant :) s/platforms/platforms+widgetsets/g :) Michael. -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Color and transparancy selection ?
On 03/23/2018 09:27 AM, Michael Van Canneyt via Lazarus wrote: On Fri, 23 Mar 2018, zeljko wrote: On 03/22/2018 08:49 PM, Michael Van Canneyt via Lazarus wrote: Hello, Is there a version of TColorDialog which allows to specify an Alpha channel ? Qt4/Qt5 ws have alpha option in standard color dialog. That's no good to me. It needs to work on all platforms, all widgetsets. This is lazarus, after all - it should work on all supported platforms. Well, Qt works on all supported desktop platforms :) zeljko -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Color and transparancy selection ?
On Fri, 23 Mar 2018, zeljko wrote: On 03/22/2018 08:49 PM, Michael Van Canneyt via Lazarus wrote: Hello, Is there a version of TColorDialog which allows to specify an Alpha channel ? Qt4/Qt5 ws have alpha option in standard color dialog. That's no good to me. It needs to work on all platforms, all widgetsets. This is lazarus, after all - it should work on all supported platforms. Michael. -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Color and transparancy selection ?
On 03/22/2018 08:49 PM, Michael Van Canneyt via Lazarus wrote: Hello, Is there a version of TColorDialog which allows to specify an Alpha channel ? Qt4/Qt5 ws have alpha option in standard color dialog. zeljko -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Color and transparancy selection ?
On 23.03.2018 1:25, Werner Pamler via Lazarus wrote: Looking at the demo of the mbColorLib again after some time I see now a terrible flicker on Windows. Ondrej, I fear your change in double-buffering killed a majority of third-party components. It may take some time until all authors will fix this (and most of them left their babies...). Why killed? You can still set the DoubleBuffered property to True. In 1.8 the DoubleBuffered property was ignored on Windows for all controls. Instead DoubleBuffered=True was forced without the chance to disable it. I.e. the property was absolutely useless since it is not used on Linux/OSX either. I just disabled the forced DoubleBuffered=True - the same what Delphi does. The only thing LCL misses is ParentDoubleBuffered that makes things easier. If you don't like the Delphi way but like the Lazarus 1.8 way - it's a valid scenario as well, but then the DoubleBuffered property should be deprecated/removed and DoubleBuffered should be handled automatically with protected methods to override the default behavior. If you want to discuss it, it will be better to open a new thread. Ondrej -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Color and transparancy selection ?
On Fri, 23 Mar 2018, Ondrej Pokorny via Lazarus wrote: On 22.03.2018 21:41, Michael Van Canneyt via Lazarus wrote: On Thu, 22 Mar 2018, Ondrej Pokorny via Lazarus wrote: On 22.03.2018 20:49, Michael Van Canneyt via Lazarus wrote: Maybe you can try to build one using http://wiki.lazarus.freepascal.org/mbColorLib#RGB_color_pickers It looks like I will have to make one myself :( This is exactly what I meant by "you can try to build one using ...". It shouldn't be that hard - just use the color picker you like (e.g. THSColorPicker) and put a spinedit next to it for the alpha channel value. Since I don't want dependencies on other packages - only the LCL can be used - this is not an option... Michael. -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Color and transparancy selection ?
On 22.03.2018 21:41, Michael Van Canneyt via Lazarus wrote: On Thu, 22 Mar 2018, Ondrej Pokorny via Lazarus wrote: On 22.03.2018 20:49, Michael Van Canneyt via Lazarus wrote: Maybe you can try to build one using http://wiki.lazarus.freepascal.org/mbColorLib#RGB_color_pickers It looks like I will have to make one myself :( This is exactly what I meant by "you can try to build one using ...". It shouldn't be that hard - just use the color picker you like (e.g. THSColorPicker) and put a spinedit next to it for the alpha channel value. Ondrej -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Color and transparancy selection ?
I've written a pascal version of some color controls which I've ported to Lazarus. Here is a link to a page with demo video: https://www.codebot.org/delphi/?doc=9524 These controls includes a hue picker that has 2 styles (radial as shown and bar), a saturation pick again with 2 styles, and an alpha picker. I also have a color value slider edit box, where you can type out a R, G, B values in bytes or floats, and it has a drop down with a left right slider that shows you the colors. They should be enough to create a decent pascal native color picker. Quick example, adding the alpha picker and drop down edit is trivial: https://s3.amazonaws.com/cache.codebot.org/videos/color-lazarus-example.mp4 -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Color and transparancy selection ?
Hello, native TColorDialog in Qt4 has slider and edit for Alpha channel but this value is never in the result (i.e. TColorDialog.Color property). TColor uses upper 8 bits for other purposes than alpha. V. __ Od: Michael Van Canneyt via Lazarus <lazarus@lists.lazarus-ide.org> Komu: Lazarus mailing list <lazarus@lists.lazarus-ide.org> Datum: 22.03.2018 20:49 Předmět: [Lazarus] Color and transparancy selection ? Hello, Is there a version of TColorDialog which allows to specify an Alpha channel ? Michael. -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus <https://lists.lazarus-ide.org/listinfo/lazarus> -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Color and transparancy selection ?
Am 22.03.2018 um 21:36 schrieb Ondrej Pokorny via Lazarus: Not in the LCL itself. Maybe you can try to build one using http://wiki.lazarus.freepascal.org/mbColorLib#RGB_color_pickers I did the port to Lazarus. But no - none of them supports an alpha channel, they focus on color selection based on a variety of color models. Maybe you should have a look at BGRABitmap and associated controls. Looking at the demo of the mbColorLib again after some time I see now a terrible flicker on Windows. Ondrej, I fear your change in double-buffering killed a majority of third-party components. It may take some time until all authors will fix this (and most of them left their babies...). Werner -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Color and transparancy selection ?
On Thu, 22 Mar 2018, Ondrej Pokorny via Lazarus wrote: On 22.03.2018 20:49, Michael Van Canneyt via Lazarus wrote: Is there a version of TColorDialog which allows to specify an Alpha channel ? Not in the LCL itself. Maybe you can try to build one using http://wiki.lazarus.freepascal.org/mbColorLib#RGB_color_pickers I didn't use it myself, it just popped up in a Google search. Hm. I didn't find that. Must have used the wrong terms. However, none of them seems to support Alpha. It looks like I will have to make one myself :( Michael. -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Color and transparancy selection ?
On 22.03.2018 20:49, Michael Van Canneyt via Lazarus wrote: Is there a version of TColorDialog which allows to specify an Alpha channel ? Not in the LCL itself. Maybe you can try to build one using http://wiki.lazarus.freepascal.org/mbColorLib#RGB_color_pickers I didn't use it myself, it just popped up in a Google search. Ondrej -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
[Lazarus] Color and transparancy selection ?
Hello, Is there a version of TColorDialog which allows to specify an Alpha channel ? Michael. -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus