Skip to content

Commit

Permalink
icon
Browse files Browse the repository at this point in the history
  • Loading branch information
pablodrake committed Oct 13, 2023
1 parent 6234b48 commit 5a2fc14
Show file tree
Hide file tree
Showing 7 changed files with 61 additions and 3 deletions.
5 changes: 2 additions & 3 deletions Mandelbrot Fractal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ SDL_Color getColor(int iterations, int maxIterations) {
auto ifactor = static_cast<size_t>(factor);
if (ifactor >= maxColor) {
// Handle the case where 'ifactor' is out of bounds.
// You can return a default color or take appropriate action.
return { 0, 0, 0, 255 };
}

Expand Down Expand Up @@ -132,7 +131,7 @@ int main()
TTF_Font* font = TTF_OpenFont("C:/Windows/Fonts/arial.ttf", 24);
if (!font)
{
TTF_Font* font = TTF_OpenFont("/usr/share/fonts/truetype/freefont/FreeMono.ttf", 24);
std::cout << "Couldn´t load a font\n";
}
SDL_Surface* surface = TTF_RenderText_Solid(font, text.c_str(), {255, 255, 255});
SDL_Texture* texture = SDL_CreateTextureFromSurface(renderer, surface);
Expand Down Expand Up @@ -194,7 +193,7 @@ int main()
}
}
}
SDL_RenderCopy(renderer, texture, nullptr, &destRect);
//SDL_RenderCopy(renderer, texture, nullptr, &destRect);
SDL_RenderPresent(renderer);
SDL_FreeSurface(surface);
SDL_DestroyTexture(texture);
Expand Down
Binary file added Mandelbrot Fractal.rc
Binary file not shown.
10 changes: 10 additions & 0 deletions Mandelbrot Fractal.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,16 @@
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="resource.h" />
<ClInclude Include="resource1.h" />
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="Mandelbrot Fractal.rc" />
</ItemGroup>
<ItemGroup>
<Image Include="icon1.ico" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
<Import Project="packages\sdl2.redist.2.0.5\build\native\sdl2.redist.targets" Condition="Exists('packages\sdl2.redist.2.0.5\build\native\sdl2.redist.targets')" />
Expand Down
18 changes: 18 additions & 0 deletions Mandelbrot Fractal.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,22 @@
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="resource.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="resource1.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="Mandelbrot Fractal.rc">
<Filter>Resource Files</Filter>
</ResourceCompile>
</ItemGroup>
<ItemGroup>
<Image Include="icon1.ico">
<Filter>Resource Files</Filter>
</Image>
</ItemGroup>
</Project>
Binary file added icon1.ico
Binary file not shown.
15 changes: 15 additions & 0 deletions resource.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
//{{NO_DEPENDENCIES}}
// Microsoft Visual C++ generated include file.
// Used by Mandelbrot Fractal.rc
//

// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 103
#define _APS_NEXT_COMMAND_VALUE 40001
#define _APS_NEXT_CONTROL_VALUE 1001
#define _APS_NEXT_SYMED_VALUE 101
#endif
#endif
16 changes: 16 additions & 0 deletions resource1.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
//{{NO_DEPENDENCIES}}
// Microsoft Visual C++ generated include file.
// Used by Mandelbrot Fractal.rc
//
#define IDI_ICON1 101

// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 102
#define _APS_NEXT_COMMAND_VALUE 40001
#define _APS_NEXT_CONTROL_VALUE 1001
#define _APS_NEXT_SYMED_VALUE 101
#endif
#endif

0 comments on commit 5a2fc14

Please sign in to comment.