Make threading and networking optional

This commit is contained in:
2025-02-27 04:17:12 -06:00
parent 29c53b171d
commit 02767f8710
39 changed files with 2054 additions and 99 deletions

31
examples/bmp4.cpp Normal file
View File

@ -0,0 +1,31 @@
#include "TessesFramework/TessesFramework.hpp"
#include <iostream>
using namespace Tesses::Framework;
using namespace Tesses::Framework::Graphics;
using namespace Tesses::Framework::Graphics::ImageFormats;
using namespace Tesses::Framework::Streams;
int main(int argc,char** argv)
{
if(argc < 3) {
std::cout << "INBMP OUTBMP" << std::endl;
return 1;
}
FileStream* src = new FileStream(argv[1],"rb");
Image img;
Bitmap bmp;
bmp.Load(src,&img);
delete src;
Image img2(img.Width()+64,img.Height()+64);
Renderers::ImageRenderer irdr(&img2);
irdr.DrawRectangle(Rectangle(0,0,(int32_t)img2.Width(),(int32_t)img2.Height()),Colors::Crimson,false);
irdr.DrawRectangle(Rectangle(1,1,(int32_t)img2.Width()-2,(int32_t)img2.Height()-2),Colors::Chartreuse,true);
irdr.DrawImage(Point(32,32),&img);
FileStream* dest = new FileStream(argv[2],"wb");
bmp.Save(dest,&img2);
delete dest;
}