Hi circular,
thanks again!
Of course, my handicap here is that I raised the question although the technical details are new for me. But, as you say, maybe it’s a chance too to have a view from “outside”.
About the Define way, yes, I’t think it would be the best approach. Some thoughts:
- the common code base, untouched, is a Must, untouched in so far of course as it would only have some additional IfnDefs, hopefully as few as possible (if I think of the hierarchie, uh ..). The Define controls which “use” and which procedures/functions will get active / visible.
- The main controlling Define could be in a special user-edited place and under the explicit responsibility of the user. Eg, only as example, in a custom.inc included in bgrabitmap.inc (customUseCoreOnly.inc or such), which is initially empty resp. does contain the setting in comments. Here are some disclaimer comments too to explain for which context this all is valid and for which scopes not.
- The restriction(s) (could be expanded/changed later if needed) are (e.g.): LCL only; at least initially only valid for a dedicated subdir, not an installed package (as the lpk itself might reference to other files too); not for other packages yet (ie. not for bgracontrols) etc. – The custom setting/file contains some rough checks (eg. nullify/Undef the setting for case IFNDEF LCL, etc.).
- Test source files of the POC (hopefully as few as possible) and a mini test project could be temporarely delivered beyond or besides “bgrabitmap” in a dedicated subdir(poc_coreonly), for people who search for such, as you say.
For testers: use temporarely those files instead of the originals, after having the originals backuped.
- Main question of course: what is “core” and what is full? 100 persons, 100 opinions, but an assumption/decision needs to be taken, otherwise it won’t never start. My entry in this area had been on the font rendering tutorial (paint outlined/shadowed text transparent) using BGRABitmap, BGRABitmapTypes, BGRATextFX), so I could imagine this could be part, as well as gradient fills and, self-evident, basic bmp (and jpg?) operations (elaborated operations are part of “full”, as well as ico, png, gif and others).
I still have no idea how far this (the degree of modifications) could lead – hopefully not too far, but the complexity is unmistakable. Only persons with depth insight can judge. Don’t know too what’s about the TBGRACanvas.Create (seems to open a new crucial field).
If at the end it turns out to get too complicated / too many files flooded with ifndefs (readability will suffer), possibly it won’t make sense. Same if there is no apparent interest expressed by others.