Recent

Author Topic: Form from PNG in Ubuntu.  (Read 6159 times)

yus

  • Jr. Member
  • **
  • Posts: 57
Form from PNG in Ubuntu.
« on: August 08, 2015, 08:17:08 pm »
Hello.

In Windows, the creation of non-standard forms of PNG images with transparency possible.

Is it possible to create such forms in Linux (Ubuntu)?

PS: Starting Windows applications in Ubuntu under Wine is working correctly.

Ubuntu screenshot

Windows screenshot

Leledumbo

  • Hero Member
  • *****
  • Posts: 8757
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: Form from PNG in Ubuntu.
« Reply #1 on: August 10, 2015, 06:51:16 am »
see examples/shapedcontrols.

Jurassic Pork

  • Hero Member
  • *****
  • Posts: 1228
Re: Form from PNG in Ubuntu.
« Reply #2 on: August 10, 2015, 09:04:33 am »
hello,
examples/shapedcontrols  uses   setshape but in an old topic here  Fred vS said :

Quote
SetShape() does not work with Carbon OSX. (but does not crash it)

 SetShape() cannot load images with Linux GTK2 and crash the system (but can load drawings and execute it.)

 SetShape() works perfectly with Linux Qt

 SetShape() works perfectly with Windows.
  for Lazarus 1.2 version.

Is that always true for Lazarus 1.4 ?
« Last Edit: August 10, 2015, 09:07:21 am by Jurassic Pork »
Jurassic computer : Sinclair ZX81 - Zilog Z80A à 3,25 MHz - RAM 1 Ko - ROM 8 Ko

Leledumbo

  • Hero Member
  • *****
  • Posts: 8757
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: Form from PNG in Ubuntu.
« Reply #3 on: August 10, 2015, 10:54:41 am »
Is that always true for Lazarus 1.4 ?
One can always try before ask, it's just a matter of compiling and running the provided example. At least on Linux GTK2/Qt it works.

aradeonas

  • Hero Member
  • *****
  • Posts: 824
Re: Form from PNG in Ubuntu.
« Reply #4 on: August 10, 2015, 11:11:30 am »
He or she wants a PNG and transparent form and the demo you said didn't support like this as it shown or Timage because its not a win control so how can make like screenshot ?

yus

  • Jr. Member
  • **
  • Posts: 57
Re: Form from PNG in Ubuntu.
« Reply #5 on: August 10, 2015, 11:25:32 am »
Thank you for answer.
see examples/shapedcontrols.
I watched this example but I could not create a form with transparency in Ubuntu.
« Last Edit: August 10, 2015, 11:39:52 am by yus »

Leledumbo

  • Hero Member
  • *****
  • Posts: 8757
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: Form from PNG in Ubuntu.
« Reply #6 on: August 10, 2015, 12:43:58 pm »
He or she wants a PNG and transparent form and the demo you said didn't support like this as it shown or Timage because its not a win control so how can make like screenshot ?
The area which is not covered by rectangular region of the form (See screenshot), isn't that transparent?
I watched this example but I could not create a form with transparency in Ubuntu.
Show your code. The example draws hexagonal form, which of course will require transparency at some parts because it's not rectangular.
« Last Edit: August 10, 2015, 12:46:05 pm by Leledumbo »

aradeonas

  • Hero Member
  • *****
  • Posts: 824
Re: Form from PNG in Ubuntu.
« Reply #7 on: August 10, 2015, 12:48:18 pm »
Me and yus want a transparent with alha channel like screen shot,what the demo shows is like Alphablend feature in the form proprieties as I see.
I saw what we want in CodeBot library demos but the no news from author and he's library :(

yus

  • Jr. Member
  • **
  • Posts: 57
Re: Form from PNG in Ubuntu.
« Reply #8 on: August 10, 2015, 12:55:54 pm »
Me and yus want a transparent with alha channel like screen shot,what the demo shows is like Alphablend feature in the form proprieties as I see.
I saw what we want in CodeBot library demos but the no news from author and he's library :(

Yes with Alpha Chanel!  :) Sorry fo my English.

I have the source code for windows, but dirty source. I wrote just to verify that can display a transparent window.
Source Windows

Leledumbo

  • Hero Member
  • *****
  • Posts: 8757
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: Form from PNG in Ubuntu.
« Reply #9 on: August 11, 2015, 05:40:53 am »
Me and yus want a transparent with alha channel like screen shot,what the demo shows is like Alphablend feature in the form proprieties as I see.
No it's not, did you even see the code? The transparent part is really because of the supplied bitmap. Change that to a bitmap made from PNG image with alpha channel and you will get the alpha channel rendered as transparent, click through applied.

yus

  • Jr. Member
  • **
  • Posts: 57
Re: Form from PNG in Ubuntu.
« Reply #10 on: August 11, 2015, 08:05:03 am »
No it's not, did you even see the code? The transparent part is really because of the supplied bitmap. Change that to a bitmap made from PNG image with alpha channel and you will get the alpha channel rendered as transparent, click through applied.
I try use png image but alpha transparent don't work with Setshape.

If you are sure that it would work. Can you show the example code?

 

TinyPortal © 2005-2018