Recent

Author Topic: New version of BGRABitmap  (Read 287691 times)

lainz

  • Hero Member
  • *****
  • Posts: 4468
    • https://lainz.github.io/
Re: New version of BGRABitmap
« Reply #390 on: June 02, 2018, 06:51:50 pm »
Hi, it works really well on macOS =)

I will test it on Windows later. And I've changed FSVG to published in dev-bgracontrols branch.

circular

  • Hero Member
  • *****
  • Posts: 4219
    • Personal webpage
Re: New version of BGRABitmap
« Reply #391 on: June 02, 2018, 07:45:46 pm »
You mean to protected?

On MacOS, the OpenGL stuff works well? That's cool
Conscience is the debugger of the mind

lainz

  • Hero Member
  • *****
  • Posts: 4468
    • https://lainz.github.io/
Re: New version of BGRABitmap
« Reply #392 on: June 02, 2018, 07:50:44 pm »
You mean to protected?

On MacOS, the OpenGL stuff works well? That's cool

Yes, to protected.

And I've not tested OpenGL yet. I will try, I'm installing a lot of stuff and that takes time =)

Lulu

  • Full Member
  • ***
  • Posts: 229
Re: New version of BGRABitmap
« Reply #393 on: June 02, 2018, 08:53:17 pm »
I've made a small program to test TextSize associated with text outline and shadow.
The idea is  - create an TBGRABitmap with width and height equal to 1, and set the font name, height and style
                   - create an TBGRATextEffectFontRenderer, fill its parameter and assign to the previous bitmap
                   - resize the TBGRABitmap with the value returned by its own method TextSize('Hello !')
                   - then draw the decorated text on the bitmap at coordinates (0,0)
On Windows, the shadow and (large) outline are clipped.
wishing you a nice life

lainz

  • Hero Member
  • *****
  • Posts: 4468
    • https://lainz.github.io/
Re: New version of BGRABitmap
« Reply #394 on: June 02, 2018, 09:57:18 pm »
Hi, @circular, I did a small tests, and the test projects seems to work, except that some has invalid paths for images. I don't know yet how to fix that.. I'm like a newby with a new tool.

I can't install OpenGL package, maybe it requires a library or something I don't have.

circular

  • Hero Member
  • *****
  • Posts: 4219
    • Personal webpage
Re: New version of BGRABitmap
« Reply #395 on: June 03, 2018, 05:39:11 pm »
Thanks Lulu for the test program. I found the source of the problem : the TextExtent function returns a height that is different from the full height specified for the font. I can scale the font but I need to investigate a bit more on this font size in order to make the same appearance on Windows and on Linux.
Conscience is the debugger of the mind

lainz

  • Hero Member
  • *****
  • Posts: 4468
    • https://lainz.github.io/
Re: New version of BGRABitmap
« Reply #396 on: June 03, 2018, 07:16:27 pm »
I've tested more. I will add more build modes to test projects in all repositories, and screenshots as in the demo repository.

Working fine and fast. The problem was I was targeting Qt. Instead of Cocoa 64.

Not sure yet about opengl.

circular

  • Hero Member
  • *****
  • Posts: 4219
    • Personal webpage
Re: New version of BGRABitmap
« Reply #397 on: June 03, 2018, 07:25:10 pm »
Thanks Lainz. It doesn't seem like you've push the changes yet.

So with Qt on MacOS, the colors are not correct?

I have applied a fix that tweaks the font height sent to the LCL Font (not on Windows though as it is already good). It's in the dev branch.

It seems now fine on Linux.

Yes Lulu, outline and shadows are clipped as they are not included in the font size. I guess it is normal that shadows would not be included, but I have a doubt about outlines. I can see why it would make sense to include outlines, as the font is somewhat bolder. However i does not really change the width/height of the text. It is more like an effect around the text. I will leave it like that because that's how it works now, but I agree it could be different.
Conscience is the debugger of the mind

lainz

  • Hero Member
  • *****
  • Posts: 4468
    • https://lainz.github.io/
Re: New version of BGRABitmap
« Reply #398 on: June 03, 2018, 07:48:33 pm »
Hi, yes, I'm starting to do it now.

And yes, there are problems with colors with Qt. But let me add the build modes to be sure of what I'm compiling is what I expect =)

I noticed that material design works really good, animations are smooth too.

Well, let's start the thing!

Lulu

  • Full Member
  • ***
  • Posts: 229
Re: New version of BGRABitmap
« Reply #399 on: June 03, 2018, 08:36:10 pm »
Yes Lulu, outline and shadows are clipped as they are not included in the font size. I guess it is normal that shadows would not be included, but I have a doubt about outlines. I can see why it would make sense to include outlines, as the font is somewhat bolder. However i does not really change the width/height of the text. It is more like an effect around the text. I will leave it like that because that's how it works now, but I agree it could be different.
I understand and  that's fine like that !
I managed to work around this problem from the result given by TextSize () and taking into account the outline width, the shadow offsets and the value of ShadowRadius. That works well. See attachment.
Thanks you for your reply :)

I noticed that material design works really good, animations are smooth too.

Well, let's start the thing!
that's good ! :)
wishing you a nice life

lainz

  • Hero Member
  • *****
  • Posts: 4468
    • https://lainz.github.io/
Re: New version of BGRABitmap
« Reply #400 on: June 03, 2018, 08:56:12 pm »
Hi, I've started to add the 'macOS 64 cocoa' build modes for bgracontrols projects and fixing path issues, I think for linux and Windows we can just use the Debug and Release, since there's no issue on these OS, because it works fine with the default settings. What do you think?

And here the screenshots. @circular, maybe you can add linux screenshots?
https://github.com/bgrabitmap/bgracontrols/blob/dev-bgracontrols/README.md#screenshots-macos-64-cocoa

And maybe I will rest a bit today  ::)

Next time goes for BGRABitmap test projects and all tests in other packages.

@circular, I forget, to fix path issues just append: Application.Location + 'filename.someext'
« Last Edit: June 03, 2018, 09:01:46 pm by lainz »

circular

  • Hero Member
  • *****
  • Posts: 4219
    • Personal webpage
Re: New version of BGRABitmap
« Reply #401 on: June 03, 2018, 09:18:03 pm »
@lainz: yes it is ok to have a build mode for MacOS. I don't know much about this build modes so I don't know if there is any other way.

Ok I will do screenshots for Linux.

Yeah have some rest my friend.

Quote
@circular, I forget, to fix path issues just append: Application.Location + 'filename.someext'
Ok.

@lulu: indeed it works fine adding the outline width / 2 and shadow size
« Last Edit: June 03, 2018, 09:23:08 pm by circular »
Conscience is the debugger of the mind

circular

  • Hero Member
  • *****
  • Posts: 4219
    • Personal webpage
Re: New version of BGRABitmap
« Reply #402 on: June 04, 2018, 06:35:07 pm »
New version of BGRABitmap (9.8 )

https://github.com/bgrabitmap/bgrabitmap/releases

Text/font:
- when splitting text, adding unicode orientation characters only when necessary and avoid infinite loop due to zero-width characters
- fixed font antialiasing gamma correction on linux
- fixed font full height on Linux

Bitmap/Canvas:
- added overload of PutImage to accept TBitmap parameter
- fixing alpha correction for Linux and MacOS (when drawing using LCL Canvas)
- optimized DrawPart (useful on Linux to update portion of virtual screen)

Miscellaneous:
- explicit overload for GetPixelCycle
- avoid some compiler bugs
- optimized blending functions (overall rendering speed on TBGRABitmap should be better)
- fixed SSE code for 64bit CPU
- fixed SVG rendering when Canvas2D has a transform
- other minor changes

Layers: started an class hierarchy for adding custom classes to the layer system (work in progress).
« Last Edit: June 05, 2018, 01:17:23 am by circular »
Conscience is the debugger of the mind

lainz

  • Hero Member
  • *****
  • Posts: 4468
    • https://lainz.github.io/
Re: New version of BGRABitmap
« Reply #403 on: June 04, 2018, 06:59:57 pm »
Hi, I'm having problems to compile BGRABitmap and BGRAControls in trunk. I've added 2 bug reports, I will try to solve the BGRAControls one.

circular

  • Hero Member
  • *****
  • Posts: 4219
    • Personal webpage
Re: New version of BGRABitmap
« Reply #404 on: June 05, 2018, 12:17:28 am »
I answered to one issue. I don't see another.
Conscience is the debugger of the mind

 

TinyPortal © 2005-2018