Giter Site home page Giter Site logo

bgragui's Introduction

List of directories:

  • bglcontrols: controls providing OpenGL surface with BGRABitmap
  • bgrabitmap: contains BGRABitmap library
  • dev: tools used to make BGRABitmap
  • doc: scripts to generate html documentation (uses pasdoc and graphviz)
  • libwebp: contains the Dll of LibWebP for Windows
  • test: contains a series of test programs and examples on how to use BGRABitmap library
  • winmake: contains batch files for make under Windows

Files:

  • commit.sh: script to commit change from Linux terminal
  • Makefile: generate the code and compile. On Windows, you need to make sure that make.exe from FPC and lazutils.exe from Lazarus tools are in the PATH.
  • update_BGRABitmap.json: package information for OPM in Lazarus

Useful binaries for Windows:

BGRA Controls

bgragui's People

Contributors

fredvs avatar lainz avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

bgragui's Issues

bgragui and msegui.

Hello everybody.

I hope all ok for you in that strange period.

I did some more test with BGRABitmap and MSEgui.

All ok but there is problem with the BGRABitmap bridge and all MSE widgets that use fpimage (error while trying to load png or other bitmap files for example).

Till now I did not find the reason why the bridge caused problems because in MSE source all fpimage* files in /msegui/compatibility/ are renamed into mse_fpimage* and in each uses section of MSEwidgets use now mse_fpimage*.

Anyway, it is about only few widgets, like Tmseimage, Tmseimagelist and disabling the bridge makes it work.
Of course the best would be to find why Tmseimage has problem with the bridge.

But maybe it could be good too to have his own Tbgraimage and a Tbgraimagelist so no need to use the Tmseimage.

Have a perfect week end.

Fre;D

bgragui and /lazarus/components/lazutils/

Hello.

What do you think to add in bgragui code or in BGRABitmap code the units needed from /lazarus/components/lazutils/?

This to not be obliged to install all Lazarus to be able to compile bgragui.

Fre;D

The way to follow

Hi, so I've finished to think a bit more about what's next.
The final idea I have is a mix of ideas, that are better for the simplicity of coding and to reuse existing code.

First we can use JSON to style, but as well the object inspector. So we can choose between using one or the other, not to be forced to use JSON or forced to use the object inspector. Both can be compatible.

The second point is that I was creating new controls in BGRAGUI instead of just porting to MSEgui. I was duplicating controls for LCL and for MSEide. That will change.

What I will do next:
I will first refactor BGRAControls. Separating the drawers from the logic on the controls like was the first idea, but not creating new controls for the LCL like I was doing in BGRAGUI. So then I need to create the controls only in MSEide and BGRAControls will remain the same functionality but better structured. The drawers can be shared between both systems (LCL / MSEide) if possible.

To resume, first refactor BGRAControls, separate control logic from the UI using drawers. Keep all the same properties in the object inspector (backward compatible). Add methods to load the styles from JSON files in the controls that has style properties (mostly all of them). Then port these controls to MSEide, reusing the drawers from BGRAControls.

So, I will be working in my spare time in BGRAControls first, then in MSEide controls.

About the CSS package: I tried to use BGRABitmap on it and it was somewhat working, replacing the Polygons function with the PolygonsAntialias that's part of BGRABitmap. The author was notified and he says that will test BGRA, so I think is a good project to look at as well. About my idea of making our controls using his package, is not a good idea because that package is a whole system that works better the way is proposed by the author, like HTML and CSS for Pascal, not as standalone controls.

Thanks for reading =)

Error: Identifier not found "TSize"

Hello.

I try to compile following your instruction, but get that error:

Compiling /home/fred/Downloads/bgragui-dev-bgragui/bgragui/bgbuttondrawer.pas
bgbuttondrawer.pas(72,7) Error: Identifier not found "TSize"
bgbuttondrawer.pas(72,12) Error: Error in type definition

Thanks.

By the way, you are not obliged to copy all the source into /msegui/lib/, you may also define the search directory with Project Options:

Capture d’écran_2020-05-11_11-48-28

Another thing about the drawer properties

Apart of using or not the CSS package...

I have a new idea as well, is somewhat an idea I already had some time ago.

In this repository https://github.com/bgrabitmap/BGRAJSONStyles
I coded a thing that works like the .css you found on a website, but with BGRABitmap.

The idea is to have string properties that can handle the style properties.

For example for color, instead of using TColor on LCL or Colorty in MSEide, we can use a string that reads the values for example:

'rgb(100,200,200)'
or in hex
'#FFFFFF'

and for the gradients like is done in a website
https://www.w3schools.com/css/css3_gradients.asp

'background-image: linear-gradient(direction, color-stop1, color-stop2, ...);'

but for our own drawers. Instead of publishing each property in the 'Styles' or 'BGStyles' property, we publish a JSON property, where you can set all the properties from a file, or type them with code, as you wish.

That's another idea for making the drawers.

An advantage of using this, for example say we want to draw the BGRAControls BCButton, it has StateNormal, StateHover, StatePressed, missing StateDisabled and StateFocused.

With JSON styles we can add properties like

button:normal {
background-color: "red"
}

button:hover {
background-color: "green"
}

button: disabled {
background-color: "gray"
}

That in a plain .json file that's human readable. Instead of messing with the object inspector, we can use that kind of files to theme the controls. Like is done in a website. We can reuse that JSON files between projects, instead of loading styles in the object inspector, just place the file in the project directory and that's all.

Well this is another idea, is for implementing the drawers.

I'm not sure wich way to follow 👎

Transparency doesn't work in custom control

I've done a simple test, copying the control TBGRAFlashProgressBar that has a transparent border and it is displayed as black. Compare how it should look in the original TBGRAFlashProgressBar from BGRAControls.

Missing instruction for mse in readme.md

Hello.

It seems that in Option 1 - Copy the instruction is missing:

Add -dBGRABITMAP_USE_MSEGUI in Project Options > Make > Make options.

And for both Options 1 and 2, add in ProjectOption-Make-Directories, the directory of
/bgrabitmap, /bgragui/bgraguicontrols/msegui and /bgragui/bgragui
Also is needed directory of /lazarus/components/lazutils

And for both Options 1 and 2, add -dclass_bridge in Project Options > Make > Make options.

Thanks.

Fre;D

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.