|
GitHub - sammycage/plutovg: Tiny 2D vector graphics library in C[^]
It's sparsely documented, and difficult to follow at first until you understand the patterns the author employs.
That being said, it's a neat bit of kit. It allows full SVG capabilities (minus the XML part) and unlike my previous offering it actually appears to render as you add items to the canvas, rather than forcing you to build the entire graphic and then pass that to the rasterizer. That in itself is really interesting.
What's also fun about it, is it uses the vestiges of a TrueType font rendering engine called FreeType to do the rasterization. It has been modified to do color paths.
But it doesn't use FreeType to support text. It uses a different engine by STB - the same one I use in my library, which is a boon to me, because I've already made a compatible port for embedded that drops in.
Anyway, it appears to be fairly unique in terms of how it operates - especially with the immediate rendering.
Check out my IoT graphics library here:
https://honeythecodewitch.com/gfx
And my IoT UI/User Experience library here:
https://honeythecodewitch.com/uix
|
|
|
|
|
|
Pretty weird, the guitar thingy is pretty cool but equally as weird.
A home without books is a body without soul. Marcus Tullius Cicero
PartsBin an Electronics Part Organizer - Release Version 1.4.0 (Many new features) JaxCoder.com
Latest Article: EventAggregator
|
|
|
|
|
The Commodore 64 was already weird, but things can get even weirder !
![Laugh | :laugh:](https://www.codeproject.com/script/Forums/Images/smiley_laugh.gif)
|
|
|
|
|
I bought one back in the early/mid? 80s, had a lot of fun with it.
A home without books is a body without soul. Marcus Tullius Cicero
PartsBin an Electronics Part Organizer - Release Version 1.4.0 (Many new features) JaxCoder.com
Latest Article: EventAggregator
|
|
|
|
|
I'm sooo confused.
CI/CD = Continuous Impediment/Continuous Despair
|
|
|
|
|
Here's the question I needed answered (and couldn't seem to find a good answer on StackOverflow):
I asked Copilot Can you show me how to copy a file from my local file system into the docker container using bash?
Copilot said Sure! You can use the docker cp command to copy a file from your local file system into a Docker container. Here’s how you can do it:
Basic Syntax:
docker cp <local_file_path> <container_name>:<container_destination_path>
Example: Let’s say you have a file named example.txt in your current directory that you want to copy to the /app directory inside a container named my_container:
docker cp example.txt my_container:/app/example.txt
Verify the File: You can then verify that the file has been copied by listing the files in the destination directory inside the container:
docker exec my_container ls /app
That's a good one!
Now I know how to interact with files _inside_ my Docker container from _outside_ (from local file system) my docker container.
Copilot is my friend. I've never been able to say that of anyone on SO.
Only, sometimes, could I say "well they didn't entirely abuse me." ![Laugh | :laugh:](https://codeproject.global.ssl.fastly.net/script/Forums/Images/smiley_laugh.gif)
|
|
|
|
|
raddevus wrote: well they didn't entirely abuse me.
You obviously weren't trying hard enough!
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
|
Whew, I got out of the computer support biz just in time. First crowdstrike, now this.
All we ever had to deal with was the old intel floating point debacle.
|
|
|
|
|
Intel can't afford to recall all of the chips it has produced in the last 2 years. OTOH, not recalling the chips gives them an incredible image problem.
I have bought Intel CPUs for the last 45 years (going back to my first IBM "portable" PC). It is likely that my next PC (or portable) will have an AMD chip.
Freedom is the freedom to say that two plus two make four. If that is granted, all else follows.
-- 6079 Smith W.
|
|
|
|
|
Luckily the Dell Inspiron 16 notebook that I recently bought (for a ridiculous low price) has an AMD Ryzen 5 processor. I'm pleased with it so far, although it does not have a dedicated graphics card I can even play Skyrim on it, the fans start blowing loudly after about 10 minutes though now it's summer ![Shucks | :-\](https://www.codeproject.com/script/Forums/Images/smiley_shucks.gif)
|
|
|
|
|
I have an AMD 5800x and an AMD 6900XT (almost three years old).
A VM, 3 Instances of "Lord of the rings" online, several browser tabs and 2 instances of Sketch up 2017 open.
Be Quiet case with 2x silent wings and a dark rock pro 4 for the CPU.
The fans only activate second speed from time to time for 10 or 15 seconds.
My first AMD components and, right now, I do not see me coming back to intel soon.
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
Rating helpful answers is nice, but saying thanks can be even nicer.
|
|
|
|
|
|
He probably meant the number of beans you did not want ![Shucks | :-\](https://www.codeproject.com/script/Forums/Images/smiley_shucks.gif)
|
|
|
|
|
no bueno
A home without books is a body without soul. Marcus Tullius Cicero
PartsBin an Electronics Part Organizer - Release Version 1.4.0 (Many new features) JaxCoder.com
Latest Article: EventAggregator
|
|
|
|
|
While working on a SPA I had some CSS that I was applying on the click of a button.
When the button was clicked, it would make one or the other DIVs go fullscreen (except for a small portion at the top where the nav bar was).
Imagine you have these two divs -- one yellow and one cyan;
#first{
background: yellow;
}
#second{
background: cyan;
} Then when you click a button in the navbar it would make one or the other go fullscreen by applying a fullscreen CSS class.
It worked great & I was very happy with the simplicity of it all.
If you really want to see it work (toggle), take a look at this simple jsfiddle[^].
.fullScreen{
width: 100%;
height: 90%;
z-index: 20;
position: absolute;
top: 12%;
padding: 10pt;
} Here's the button click code.
document.querySelector("#first").classList.add("fullScreen");
document.querySelector("#second").classList.remove("fullScreen");
It Worked, Then Didn't!
It was all working. I copied the code to another project and had it all set up.
But suddenly clicking the button wouldn't do the fullscreen. I tried all manner of things.
Was the button click working? I added an alert() and saw the button was working.
I was going out of my bleedin' mind.
Then I looked real hard at the styles that I had copied to the new project.
Can You See It?
Do you see the problem?
#first{
background: yellow;
}
#second{
background: cyan;
};
.fullScreen{
width: 100%;
height: 90%;
z-index: 20;
position: absolute;
top: 12%;
padding: 10pt;
}
Oy!! I have only myself to blame.
As Sophocles said: The keenest sorrow is to recognize ourselves as the sole cause of all our adversities.
Sophocles was obviously a software developer.
|
|
|
|
|
raddevus wrote: Do you see the problem? Don't see the reason for it off the top of my head. Absolute should work with a static parent. Usually when stuff is not shown and it's not a display issue (or no content) then it's related to height. As body height needs to be set as well, etc. So that would be my guess.
Couple points about your code though...
I urge you to consider never, ever doing that again though. You don't need to hard code offsets, as that'll just make things harder to maintain. And, this day and age we should be using flexbox for layout. And yes that includes fullscreen dialogs. It'll keep things organized sooo much better and if you ever need to stack a dialog on top of your main content or stack multiple dialogs, then it'll make your life easier.
Also, never, ever use height 100% in that manner. There are better ways now. That was the trick 20 years ago. These days it's much, much better to use viewport units for layout. Height 100% means 100% of the parent. That trick only only worked when you set both the html and body tag to height 100%. I still set both html and body out of habit for viewport, but there's no need for that now. Just use viewport units with the added benefit of being semantic.
Also, consider using the semantic dialog tag. It'll fall back to a regular div on non-supported browsers. But if the intent is to have a fullscreen dialog show, then it'll help screen readers know what's up.
Tossed together a fiddle for poops and giggles. Clickety
Jeremy Falcon
modified 22-Jul-24 20:31pm.
|
|
|
|
|
Wow, thanks for the tips. I really appreciate it.
I was just going for the absolute quickest way I could get a div to go fullscreen.
I will examine the JSFiddle more closely and make some changes.
Thanks again.
![Thumbs Up | :thumbsup:](https://codeproject.freetls.fastly.net/script/Forums/Images/thumbs_up.gif)
|
|
|
|
|
Any time, buddy.
Jeremy Falcon
|
|
|
|
|
Just checked the fiddle again and there was a tiny bug in it with the hidden style. If the dialog tag is supported then most browsers apply an automatic user agent style to it. So, forgot to add padding and margin resets in the class.
This fixes it: Clickety. So should work if you apply the hidden class to either the popup or the main tag.
It's worth noting this isn't an modal or modeless overlay dialog anymore, but quite literately replaces the main content while still allowing for having a nav bar up top. If it were an overlay that just covered the whole thing (drop shadow etc.) then absolute positioning is the way to go. But, IMO overlays don't look nearly as modern as this does.
Jeremy Falcon
modified 23-Jul-24 15:27pm.
|
|
|
|
|
|
|
Not a Javascript programmer, but I guess the extra semicolon?
|
|
|
|
|
You got it!
It was the semicolon located after the second style.
That just blew my mind! I will make no more mistakes with semicolons (he said doubting himself).
#first{
background: yellow;
}
#second{
background: cyan;
};
.fullScreen{
width: 100%;
height: 90%;
z-index: 20;
position: absolute;
top: 12%;
padding: 10pt;
}
|
|
|
|