Recent

Author Topic: [CLOSED] BGRAControls  (Read 494332 times)

Dibo

  • Hero Member
  • *****
  • Posts: 1048
Re: BGRAControls - solution for GTK alpha
« Reply #15 on: April 07, 2011, 11:25:45 pm »
Ok, thanks for info. I will observe LazPaint topic for changes :)

circular

  • Hero Member
  • *****
  • Posts: 3405
    • Personal webpage
Re: BGRAControls - solution for GTK alpha
« Reply #16 on: April 08, 2011, 01:23:09 am »
I will send you a PM when I do.
Conscience is the debugger of the mind

Dibo

  • Hero Member
  • *****
  • Posts: 1048
Re: BGRAControls - solution for GTK alpha
« Reply #17 on: April 10, 2011, 03:12:09 pm »
New version 1.0.6.0

Synchronization with "opaque" mode of BGRABitmap. Link in first post

lainz

  • Guest
Re: BGRAControls - solution for GTK alpha
« Reply #18 on: April 15, 2011, 06:29:49 pm »
New version 1.0.5.0

Changes:
  • I created new component TBGRASpeedButton which inherit from TSpeedButton and draw glyph using BGRABitmap (see attached screens in first post), so I change package name from BGRAImageList to BGRAControls. All components are available now in own components palette "BGRA Controls"
  • Package doesn't include BGRABitmap source anymore. BGRABitmap from version 2.4 is published as independent package, so you need install it at first. BGRABitmap package is added as required package of BGRAControls package
  • On windows, controls don't use Opaque mode (I notify some random artifacts)
  • You can install BGRAControls package with -dGTK_ONLY switch in compiler options. With this switch it use default lazarus drawing for other interfaces than GTK

Link and details in first post.

Regards

Amazing  ::)

You can do a 'Image Button' component with BGRABitmap? I need the component for this:

http://www.lazarus.freepascal.org/index.php/topic,12824.msg66429.html#msg66429
« Last Edit: April 15, 2011, 06:35:12 pm by lainz »

Dibo

  • Hero Member
  • *****
  • Posts: 1048
Re: BGRAControls - solution for GTK alpha
« Reply #19 on: April 15, 2011, 06:52:47 pm »
What this component should do? Draw PNG image as button in different states?

lainz

  • Guest
Re: BGRAControls - solution for GTK alpha
« Reply #20 on: April 15, 2011, 08:16:34 pm »
What this component should do? Draw PNG image as button in different states?

Exactly.

Dibo

  • Hero Member
  • *****
  • Posts: 1048
Re: BGRAControls - solution for GTK alpha
« Reply #21 on: April 15, 2011, 08:35:54 pm »
Because I looked quickly at your source and I saw that you don't draw images but only draw gradients etc.

lainz

  • Guest
Re: BGRAControls - solution for GTK alpha
« Reply #22 on: April 18, 2011, 04:35:18 pm »
Because I looked quickly at your source and I saw that you don't draw images but only draw gradients etc.

I'm sorry. Now I know the right translation for 'image' / 'picture' / 'bitmap' & 'drawing'.

I must say bgra-bitmap or bgra drawing. Never picture or image file.

The component must draw a bitmap in a canvas in different states, not a PNG file.
« Last Edit: April 18, 2011, 04:37:14 pm by lainz »

Dibo

  • Hero Member
  • *****
  • Posts: 1048
Re: BGRAControls - solution for GTK alpha
« Reply #23 on: May 01, 2011, 12:05:52 am »
New version 1.0.8.0

New components:
TBGRAButton - Customizable graphic component which using only BGRABitmap functions for drawing (see attached screen). Demo project included in package. Functionality:
  • Gradients
  • Double gradients
  • Rounding
  • Border style, width and color
  • Drop down list
  • Glyph
  • States (normal, hover, clicked)
  • Caption with shadow
  • Full alpha and antialias support
  • Can work as Image if no caption is set (have no stretch function yet)
I wanted add "container" functionality (like TPanel) so this same component could be used as toolbar with childs but TCustomControl have no transparency. I created task for this issue in forum:
http://www.lazarus.freepascal.org/index.php/topic,12933.0.html
and mailing list:
http://lists.lazarus.freepascal.org/pipermail/lazarus/2011-April/062683.html
But no response :/ . I try report this as a bug. Instead, I created TBGRAPanel with similar gradient functionality (but very limited)
TBGRAPanel - Simple TPanel descendant which can have gradient background. Created especially for TBGRAButton (for creating nice looking toolbar for bgrabuttons)

Download link in first post

I think I should create some lazarus wiki page for BGRA Controls. I can't add more screens in first post :P
« Last Edit: May 01, 2011, 02:12:46 am by Dibo »

CaptBill

  • Sr. Member
  • ****
  • Posts: 435
Re: BGRAControls - solution for GTK alpha
« Reply #24 on: May 01, 2011, 01:36:05 am »
Quote
Dibo:
I think I should create some lazarus wiki page for BGRA Controls. I can't add more screens in first post Tongue

Please do. Excellent work.

If you can build container array that will be sweet, very sweet.

Even without the transparency would be very nice. Any chance you can just do a no-transparency version?

Dibo

  • Hero Member
  • *****
  • Posts: 1048
Re: BGRAControls - solution for GTK alpha
« Reply #25 on: May 01, 2011, 01:39:00 am »
Even without the transparency would be very nice. Any chance you can just do a no-transparency version?
Then will be problem. Look at rounded buttons on demo screen, if I change this component to "container" then rounded space will by painted by some default control color (I have no influence on it)

CaptBill

  • Sr. Member
  • ****
  • Posts: 435
Re: BGRAControls - solution for GTK alpha
« Reply #26 on: May 01, 2011, 02:16:17 am »
Even without the transparency would be very nice. Any chance you can just do a no-transparency version?
Then will be problem. Look at rounded buttons on demo screen, if I change this component to "container" then rounded space will by painted by some default control color (I have no influence on it)

Ok.Thanks.

I just installed BGRAControls and all seem to go well. Are these components suppose to show up on the component pallet? Same with BGRAbitmappack. I assumed they are loaded in a nonvisual mode(no visible components). They are listed loaded in 'installed static, autoinstall static'. Should I be seeing a new tab on the components pallet or no?


Dibo

  • Hero Member
  • *****
  • Posts: 1048
Re: BGRAControls
« Reply #27 on: May 01, 2011, 02:18:12 am »
They all should be in own pallet "BGRA Controls". They are designing components (sorry for my english)

CaptBill

  • Sr. Member
  • ****
  • Posts: 435
Re: BGRAControls
« Reply #28 on: May 01, 2011, 02:37:05 am »
Managed to get it installed on the pallet. Every thing looks very nice ,very nice indeed. THIS is where its at for graphics. Good deal.

I am have a serious conflict with the speedbutton component somewhere, unfortunately. I get this every time I drop one on a form......

"Invalid raw image format (15 found)"

Crashes Lazarus each time. Am I missing some image format driver maybe?

Thanks again.

Edit:
I am running the newest CodeTyphon 1.6 install (Laz9.31) on Xp, btw.
« Last Edit: May 01, 2011, 02:39:37 am by CaptBill »

circular

  • Hero Member
  • *****
  • Posts: 3405
    • Personal webpage
Re: BGRAControls
« Reply #29 on: May 01, 2011, 10:41:33 am »
I've tried to fix the raw image format issue. Try download last version on subversion and tell me if it works. You'll need to recompile Lazarus (in Tools menu).

Checkout address : https://lazpaint.svn.sourceforge.net/svnroot/lazpaint

Conscience is the debugger of the mind

 

TinyPortal © 2005-2018