New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Simplify examples #69
Comments
I like the idea of having a limited set of examples. And with examples I really mean examples, that show the new users how to use the library. Ideally, it would be done in some sort of didactic manner. Starting from very basic to complex. Eventually we could also have some sort of a mega demo, which demonstrates all possibilities, but not too much. This said, the current examples are not that bad. They just need some more comments and explanations. We should still keep them, but probably sort a few out into a new "GR32 Showcase" project. That would also increase the count of open source delphi projects, eventually making the language more visible in programming laguage indices such as red monk. |
I had now looked through a few of the examples. Compared to other open source projects they are already quite well structured and documented at most places. I have now added a few more comments. There are still many examples which lack a documentation. If time permits, I will go through the existing examples and comment them one by one. In order to get some v2.0 done, I'd say we should keep all the examples for that release. We should put new examples on the roadmap for any of the next releases. |
I agree. Can you create a Milestone for post 2.0 work and assign this one to it? |
Regarding examples, there is currently no provision for DPI scaling by the OS and consequently all the samples are being image scaled by the Windows when Large Text is selected (see Ease of Access | Display in Windows Settings). This causes noticeable blurring when scaling >= 150% which is obviously problematic when we're interested in assessing image quality. |
Good idea. I would tune the manifest a bit though. I'm seeing in your manifest:
|
@micha137 I believe the reference to manifest.res you removed in commit 98b8ebc was part of the changes @AngusJohnson made for this issue. I just think Angus forgot to commit the |
Sorry, I didn't see the connection to this issue. Then manifest.res needs to be added, together with the reference(s) again. |
I think @AngusJohnson can do that once he's ready to commit the file. For now it's more important to leave the repository in a consistent state. |
I presume you were referring to manifest.res file which I've just uploaded |
Hi. by the way, current Lazarus supports *.dpr and *.dfm. |
That would be excellent. Thanks for the info. |
The current suite of example applications does a wonderful job of showcasing what can be done with Graphics32. However they are not very good at exemplifying how things are done.
Mostly it is possible to glean from the examples how things are done, but one has to mentally filter out all the supporting code such as UI control logic, "clever" tricks and additional gimmicks that doesn't really pertain to the core subject of the example. The result is that it takes an unnecessary effort to understand how to accomplish a specific task with Graphics32 - even for seasoned users of the library.
I propose that the examples be simplified so they are more approachable when learning Graphics32.
The more complex examples can be moved to a Showcases folder so we retain that ability.
A few examples of what I mean:
BlendVsMerge
Modifies bitmaps in place to creates a horizontal alpha gradient. A few comments should explain why this is done.
This task is so common it should be built into TImage32, but that's another story.
PixelCombine
Display alternating pixels between foreground and background using a vertical grid pattern:
I'm sure the above saves a few microseconds, but using a boolean toggle would have saved the user from wondering what the heck is going on.
TextureBlend
Not even sure what it is this one demonstrates...
ArrowHead
Animation and collision detection. Impressive but hardly relevant to arrow heads...
etc. etc.
The AntiAliasing example is actually a really good showcase - and it is so simple and well commented that it's also a good example of how to draw different shapes.
The text was updated successfully, but these errors were encountered: