Recent

Author Topic: BGRA Controls  (Read 143089 times)

josh

  • Hero Member
  • *****
  • Posts: 754
Re: BGRA Controls v4.5
« Reply #300 on: February 08, 2018, 12:33:36 am »
Hi Lainz,

Thanks for getting Back to me, not the answer I was hoping for.

I will have to experiment with other Graphics Libraries to see if they display unicode text correctly with installed fonts, and possibly overtime refrain from using bgrabitmap and bgracontrols.

A shame as its a very good library.
« Last Edit: February 08, 2018, 12:40:24 am by josh »
Development Installation Lazarus 1.3, FPC 2.7.1,Windows 7/8 32/64, OSX, *nix

Test Environment Lazarus & FPC Trunk on Windows and OSX (Cocoa Mainly on OSX). Testing also Crosscompile windows to OSX.. 
Any posts made from 2015 will be based on Lazarus Trunk.

lainz

  • Hero Member
  • *****
  • Posts: 3313
    • Lainz
Re: BGRA Controls v4.5
« Reply #301 on: February 08, 2018, 02:05:16 am »
Hi, josh, the problem is on Lazarus TCanvas, try drawing unicode text on a TCanvas, it doesn't display well also. BGRABitmap uses LCL for drawing text, not his own way.

Code: Pascal  [Select]
  1. procedure TForm1.FormPaint(Sender: TObject);
  2. begin
  3.   Canvas.Font.Name:='Eurostile LT Std';
  4.   Canvas.TextOut(0, 0, 'TextRect: ƉҼИ');
  5. end;  
       

The thing is that LCL controls does not use canvas, but the system drawing for text, because that you see the unicode text on these. But not if you make, for example, a custom control with canvas drawing for text.

So, in fact, we can't fix it if that is not fixed on Lazarus first.

engkin

  • Hero Member
  • *****
  • Posts: 2513
Re: BGRA Controls v4.5
« Reply #302 on: February 08, 2018, 03:12:15 am »
The Odd thing is that it is not all fonts

See pic using century gothic font all is ok.
I guess the fonts that work have the needed glyphs. Check the fonts that don't work, do they have the missing glyphs?

For instance, on my system using charmap (Unicode Subrange - Cyrillic) Century Gothic has Cyrillic glyphs. While Eurostile does not.

So, in fact, we can't fix it if that is not fixed on Lazarus first.
There is nothing to fix, if the font does not include needed glyphs.
« Last Edit: February 08, 2018, 03:32:18 am by engkin »

josh

  • Hero Member
  • *****
  • Posts: 754
Re: BGRA Controls v4.5
« Reply #303 on: February 08, 2018, 11:40:00 am »
Hi

The fonts that I use, work fine on other components and also when used within all other applications, like word, libreoffice, excel etc.

I quick video done showing the issue with other control I have been testing.

This is as Lainz has said not just BGAControls but effects half of the 3rd party controls I have tested.

« Last Edit: February 08, 2018, 11:43:34 am by josh »
Development Installation Lazarus 1.3, FPC 2.7.1,Windows 7/8 32/64, OSX, *nix

Test Environment Lazarus & FPC Trunk on Windows and OSX (Cocoa Mainly on OSX). Testing also Crosscompile windows to OSX.. 
Any posts made from 2015 will be based on Lazarus Trunk.

lainz

  • Hero Member
  • *****
  • Posts: 3313
    • Lainz
Re: BGRA Controls v4.5
« Reply #304 on: February 08, 2018, 12:51:05 pm »
So, in fact, we can't fix it if that is not fixed on Lazarus first.
There is nothing to fix, if the font does not include needed glyphs.

Yes, but as I can see, the system when draws text uses a fallback font if the font you provide does not have the glyphs. That's the reason why TLabel and TButton works fine.

But Canvas uses also the OS implementation, is not a custom canvas for the LCL, so there is nothing to fix, you're right.

josh

  • Hero Member
  • *****
  • Posts: 754
Re: BGRA Controls v4.5
« Reply #305 on: February 08, 2018, 05:56:06 pm »
Hi Lainz.

Just done another fresh install of Trunk on Windows SVN57273 and getting a probloem trying to install latest bgracontrols.

Downloaded and installed bgrabitmap 9.6.1 all ok, and appear in list of packages.
Downloaded bgracontrols 4.5 and when I try to install package I get.
Code: [Select]
bcimagebutton.pas(48,32) Fatal: Cannot find BGRASliceScaling used by BCImageButton, incompatible ppu=C:\Components\bgrabitmap-9.6.1\bgrabitmap\lib\i386-win32\3.1.1\bgraslicescaling.ppu, package BGRABitmapPack

Has something changed with the installation ?
Development Installation Lazarus 1.3, FPC 2.7.1,Windows 7/8 32/64, OSX, *nix

Test Environment Lazarus & FPC Trunk on Windows and OSX (Cocoa Mainly on OSX). Testing also Crosscompile windows to OSX.. 
Any posts made from 2015 will be based on Lazarus Trunk.

lainz

  • Hero Member
  • *****
  • Posts: 3313
    • Lainz
Re: BGRA Controls v4.5
« Reply #306 on: February 08, 2018, 06:34:02 pm »
Hi Lainz.

Just done another fresh install of Trunk on Windows SVN57273 and getting a probloem trying to install latest bgracontrols.

Downloaded and installed bgrabitmap 9.6.1 all ok, and appear in list of packages.
Downloaded bgracontrols 4.5 and when I try to install package I get.
Code: [Select]
bcimagebutton.pas(48,32) Fatal: Cannot find BGRASliceScaling used by BCImageButton, incompatible ppu=C:\Components\bgrabitmap-9.6.1\bgrabitmap\lib\i386-win32\3.1.1\bgraslicescaling.ppu, package BGRABitmapPack

Has something changed with the installation ?

Something changed in Lazarus, exactly TImageList and that is causing problems with the installation.

But, there is another problem with your installation, I don't know. Try deleting bgracontrols and removing it complete first from lazarus. Then redonwnload and reinstall.

josh

  • Hero Member
  • *****
  • Posts: 754
Re: BGRA Controls v4.5
« Reply #307 on: February 08, 2018, 06:57:18 pm »
Hi

I have removed Lazarus completely, re-insatlled latest trunk, download latest 9.6.1 installed, re-downloaded bgracontrol 4.5 and am getting the same error.

I think the lates trunk from the last few days is causing issues, with lazarus, as when you install a component the ide rebuilds, but when lazarus auto-starts it does not open as normal, you have to click the icon in the task bar to see it.  Even tools build  lazarus exhibits the same behaviour

« Last Edit: February 08, 2018, 06:59:21 pm by josh »
Development Installation Lazarus 1.3, FPC 2.7.1,Windows 7/8 32/64, OSX, *nix

Test Environment Lazarus & FPC Trunk on Windows and OSX (Cocoa Mainly on OSX). Testing also Crosscompile windows to OSX.. 
Any posts made from 2015 will be based on Lazarus Trunk.

engkin

  • Hero Member
  • *****
  • Posts: 2513
Re: BGRA Controls v4.5
« Reply #308 on: February 08, 2018, 09:23:51 pm »
Yes, but as I can see, the system when draws text uses a fallback font if the font you provide does not have the glyphs. That's the reason why TLabel and TButton works fine.

On Windows, TextOutW (and its variations) uses the supplied font, while DrawTextW does font substitution for missing glyphs.

lainz

  • Hero Member
  • *****
  • Posts: 3313
    • Lainz
Re: BGRA Controls v4.5
« Reply #309 on: February 08, 2018, 10:13:46 pm »
Yes, but as I can see, the system when draws text uses a fallback font if the font you provide does not have the glyphs. That's the reason why TLabel and TButton works fine.

On Windows, TextOutW (and its variations) uses the supplied font, while DrawTextW does font substitution for missing glyphs.

Thanks, I will report in the BGRABitmap bug page.

Hi

I have removed Lazarus completely, re-insatlled latest trunk, download latest 9.6.1 installed, re-downloaded bgracontrol 4.5 and am getting the same error.

I think the lates trunk from the last few days is causing issues, with lazarus, as when you install a component the ide rebuilds, but when lazarus auto-starts it does not open as normal, you have to click the icon in the task bar to see it.  Even tools build  lazarus exhibits the same behaviour



Try with Online Package Manager.

josh

  • Hero Member
  • *****
  • Posts: 754
Re: BGRA Controls v4.5
« Reply #310 on: February 08, 2018, 10:36:46 pm »
Hi

I managed to get it to finally install, for some reason I had to install BGABitmap and BGRACOntrols in the same session before a rebuild of IDE, previously I installed bgrabitmap then my own components (that use bgrabitmap); then rebuilt the ide, then tried bgracontrols which failed. So something is odd in trunk.

Unfortunatly I do not use OPM, as I find that it oftens leaves multiple mis-installed components, ie if a component failed to install I have to go manually into packaged installed packages and remove them, its as though OPM is updating component list even if it fails to install them. Also I prefer to have my own set of used components with known versions that work, across different pc and platforms. I have used it though to get some latest components but do not install them from OPM, I just use OPM to download them and then I move them to my component folder.  This is not negative of OPM as I think it is a very good utility to get access to components, and I do use it but not in its 'intended way'. :)
Development Installation Lazarus 1.3, FPC 2.7.1,Windows 7/8 32/64, OSX, *nix

Test Environment Lazarus & FPC Trunk on Windows and OSX (Cocoa Mainly on OSX). Testing also Crosscompile windows to OSX.. 
Any posts made from 2015 will be based on Lazarus Trunk.

lainz

  • Hero Member
  • *****
  • Posts: 3313
    • Lainz
Re: BGRA Controls v4.5
« Reply #311 on: February 08, 2018, 10:38:35 pm »
Hi

I managed to get it to finally install, for some reason I had to install BGABitmap and BGRACOntrols in the same session before a rebuild of IDE, previously I installed bgrabitmap then my own components (that use bgrabitmap); then rebuilt the ide, then tried bgracontrols which failed. So something is odd in trunk.

Unfortunatly I do not use OPM, as I find that it oftens leaves multiple mis-installed components, ie if a component failed to install I have to go manually into packaged installed packages and remove them, its as though OPM is updating component list even if it fails to install them. Also I prefer to have my own set of used components with known versions that work, across different pc and platforms. I have used it though to get some latest components but do not install them from OPM, I just use OPM to download them and then I move them to my component folder.  This is not negative of OPM as I think it is a very good utility to get access to components, and I do use it but not in its 'intended way'. :)

I know is not perfect yet, but you must report these bugs as is the best tool I know to install stuff in Lazarus.

lainz

  • Hero Member
  • *****
  • Posts: 3313
    • Lainz
Re: BGRA Controls v4.5
« Reply #312 on: February 08, 2018, 11:31:18 pm »
New BGRAControls v4.5.1
- Fix compiling in Lazarus trunk for Linux, now BGRAImageList is like a normal Image List with no fixes for transparency (Reason: Changes in ImageList that broken BGRAImageList).

If you're using Lazarus 1.8 and still want these transparency fixes is really easy to enable: go to BGRAImageList.pas and change

Code: Pascal  [Select]
  1. { $DEFINE BGRA_DRAW}
to
Code: Pascal  [Select]
  1. {$DEFINE BGRA_DRAW}
(remove first empty space to enable the define) at the top of the file.

boxofrelays

  • Newbie
  • Posts: 2
    • systems integration group
Re: BGRA Controls v4.5.1
« Reply #313 on: February 09, 2018, 04:22:25 am »
I seemed to have problems on the latest install as I was adding packages for my development on the version 64-bit version but not the 32-bit version. I have a 32-bit and a 64-bit Lazarus install on my Win10 64-bit machine.  Download was from source forge. I tried a download from a mirror site and no problem on the 64-bit install and adding packages on both 64 and 32 some BRGA controls in the mix. Wondering if there is some variance on the installers from mirror sites and the source forge site?   8)

GetMem

  • Hero Member
  • *****
  • Posts: 3519
Re: BGRA Controls v4.5.1
« Reply #314 on: February 09, 2018, 07:01:11 am »
@josh
Quote
Unfortunatly I do not use OPM, as I find that it oftens leaves multiple mis-installed components, ie if a component failed to install I have to go manually into packaged installed packages and remove them, its as though OPM is updating component list even if it fails to install them. Also I prefer to have my own set of used components with known versions that work, across different pc and platforms. I have used it though to get some latest components but do not install them from OPM, I just use OPM to download them and then I move them to my component folder.  This is not negative of OPM as I think it is a very good utility to get access to components, and I do use it but not in its 'intended way'.
It's perfectly fine if you don't want to use OPM, you can even criticize it, I don't mind.  :) In fact I don't think there is a tool that fits everyone needs. About multiple "mis-installed components" there is a "Cleanup" button(see attached image), which will automatically remove every non-installed package from the local repository. The "Open" button will open the local repository in a separate filemanager/explorer window.

@lainz
I updated BGRAControls.