Moved to new folders
This commit is contained in:
BIN
Oving7/O7_utdelt.zip
Normal file
BIN
Oving7/O7_utdelt.zip
Normal file
Binary file not shown.
31
Oving7/Oving 7.sln
Normal file
31
Oving7/Oving 7.sln
Normal file
@@ -0,0 +1,31 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 15
|
||||
VisualStudioVersion = 15.0.28307.271
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Oving 7", "Oving 7\Oving 7.vcxproj", "{5DD82174-56A0-44B0-A0D8-4C2F7CF008B9}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|x64 = Debug|x64
|
||||
Debug|x86 = Debug|x86
|
||||
Release|x64 = Release|x64
|
||||
Release|x86 = Release|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{5DD82174-56A0-44B0-A0D8-4C2F7CF008B9}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{5DD82174-56A0-44B0-A0D8-4C2F7CF008B9}.Debug|x64.Build.0 = Debug|x64
|
||||
{5DD82174-56A0-44B0-A0D8-4C2F7CF008B9}.Debug|x86.ActiveCfg = Debug|Win32
|
||||
{5DD82174-56A0-44B0-A0D8-4C2F7CF008B9}.Debug|x86.Build.0 = Debug|Win32
|
||||
{5DD82174-56A0-44B0-A0D8-4C2F7CF008B9}.Release|x64.ActiveCfg = Release|x64
|
||||
{5DD82174-56A0-44B0-A0D8-4C2F7CF008B9}.Release|x64.Build.0 = Release|x64
|
||||
{5DD82174-56A0-44B0-A0D8-4C2F7CF008B9}.Release|x86.ActiveCfg = Release|Win32
|
||||
{5DD82174-56A0-44B0-A0D8-4C2F7CF008B9}.Release|x86.Build.0 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {034CFCEE-6BB4-4224-BF80-4BF52A420855}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
161
Oving7/Oving 7/Emoji.cpp
Normal file
161
Oving7/Oving 7/Emoji.cpp
Normal file
@@ -0,0 +1,161 @@
|
||||
#include "Emoji.h"
|
||||
|
||||
/*
|
||||
* Implement your emojis in this file.
|
||||
**/
|
||||
|
||||
// A yellow, empty face.
|
||||
Face::Face(Point c, int r) : faceMask{c, r}
|
||||
{
|
||||
faceMask.set_fill_color(Color::yellow);
|
||||
faceMask.set_color(Color::black);
|
||||
}
|
||||
|
||||
void Face::attach_to(Graph_lib::Window& win)
|
||||
{
|
||||
win.attach(faceMask);
|
||||
}
|
||||
|
||||
#pragma region EmptyFace
|
||||
|
||||
EmptyFace::EmptyFace(Point p, int r) : Face(p, r),
|
||||
leftEye{ Point{ p.x - r / 2, p.y - r / 8 }, r / 10 },
|
||||
rightEye{ Point { p.x + r / 2, p.y - r / 8 }, r / 10 }
|
||||
{
|
||||
|
||||
leftEye.set_fill_color(Color::black);
|
||||
rightEye.set_fill_color(Color::black);
|
||||
|
||||
leftEye.set_color(Color::black);
|
||||
rightEye.set_color(Color::black);
|
||||
}
|
||||
|
||||
void EmptyFace::attach_to(Graph_lib::Window & win)
|
||||
{
|
||||
Face::attach_to(win);
|
||||
win.attach(leftEye);
|
||||
win.attach(rightEye);
|
||||
}
|
||||
|
||||
|
||||
#pragma endregion
|
||||
|
||||
|
||||
#pragma region SmileyFace
|
||||
|
||||
SmileyFace::SmileyFace(Point p, int r) : EmptyFace{ p,r }, Smile{ Point{p.x, p.y + r / 10}, int(4 / 3 * r), r, 180, 360 }
|
||||
{
|
||||
Smile.set_color(Color::black);
|
||||
Smile.set_style(Line_style(Line_style::solid, 4));
|
||||
}
|
||||
|
||||
void SmileyFace::attach_to(Graph_lib::Window & win)
|
||||
{
|
||||
EmptyFace::attach_to(win);
|
||||
win.attach(Smile);
|
||||
}
|
||||
|
||||
#pragma endregion
|
||||
|
||||
|
||||
#pragma region SadFace
|
||||
|
||||
SadFace::SadFace(Point p, int r) : EmptyFace{ p,r }, Sad{ Point{p.x, p.y + r - r / 3}, int(4 / 3 * r), r, 0, 180 }
|
||||
{
|
||||
Sad.set_color(Color::black);
|
||||
Sad.set_style(Line_style(Line_style::solid, 4));
|
||||
}
|
||||
|
||||
void SadFace::attach_to(Graph_lib::Window & win)
|
||||
{
|
||||
EmptyFace::attach_to(win);
|
||||
win.attach(Sad);
|
||||
}
|
||||
|
||||
#pragma endregion
|
||||
|
||||
|
||||
#pragma region AngryFace
|
||||
|
||||
AngryFace::AngryFace(Point p, int r) : EmptyFace{ p,r },
|
||||
AngryOver{ Point{p.x, p.y + r - r / 3}, int(4 / 3 * r), r, 0, 180 },
|
||||
x1{3 * r / 5}, y1{ 4 * r / 5 },
|
||||
x2{r / 8}, y2{2 * r / 3},
|
||||
leftBrow{Point{p.x - x1, p.y - y1}, Point{p.x - x2, p.y - y2}},
|
||||
rightBrow{ Point{p.x + x1, p.y - y1}, Point{p.x + x2, p.y - y2} }
|
||||
{
|
||||
AngryOver.set_color(Color::black);
|
||||
AngryOver.set_style(Line_style(Line_style::solid, 4));
|
||||
leftBrow.set_color(Color::black);
|
||||
leftBrow.set_style(Line_style(Line_style::solid, 4));
|
||||
rightBrow.set_color(Color::black);
|
||||
rightBrow.set_style(Line_style(Line_style::solid, 4));
|
||||
}
|
||||
|
||||
|
||||
void AngryFace::attach_to(Graph_lib::Window & win)
|
||||
{
|
||||
EmptyFace::attach_to(win);
|
||||
win.attach(AngryOver);
|
||||
win.attach(leftBrow);
|
||||
win.attach(rightBrow);
|
||||
}
|
||||
|
||||
#pragma endregion
|
||||
|
||||
|
||||
#pragma region WinkingFace
|
||||
|
||||
WinkingFace::WinkingFace(Point p, int r) : Face(p, r),
|
||||
leftEye{ Point{ p.x - r / 2, p.y - r / 2 }, r / 10 },
|
||||
smile{ Point{p.x, p.y + r / 10}, int(4 / 3 * r), r, 180, 360 },
|
||||
x1{p.x + r / 6}, x2{p.x + 6* r / 10},
|
||||
y1{p.y - 7 * r / 10}, y2{ p.y - r / 2}, y3{ p.y - 3 * r / 10}
|
||||
{
|
||||
|
||||
leftEye.set_fill_color(Color::black);
|
||||
leftEye.set_color(Color::black);
|
||||
|
||||
smile.set_color(Color::black);
|
||||
smile.set_style(Line_style(Line_style::solid, 4));
|
||||
|
||||
wink.add(Point{ x2,y1 });
|
||||
wink.add(Point{ x1, y2 });
|
||||
wink.add(Point{ x2,y3 });
|
||||
wink.set_color(Color::black);
|
||||
wink.set_style(Line_style(Line_style::solid, 3));
|
||||
}
|
||||
|
||||
void WinkingFace::attach_to(Graph_lib::Window & win)
|
||||
{
|
||||
Face::attach_to(win);
|
||||
win.attach(leftEye);
|
||||
win.attach(smile);
|
||||
win.attach(wink);
|
||||
}
|
||||
|
||||
#pragma endregion
|
||||
|
||||
AwkwardFace::AwkwardFace(Point p, int r) : Face{p, r},
|
||||
leftEye{Point{p.x - 4 * r / 5, p.y}, r / 10},
|
||||
rightEye{Point{p.x + 4 * r / 5, p.y}, r / 10}
|
||||
{
|
||||
leftEye.set_fill_color(Color::black);
|
||||
rightEye.set_fill_color(Color::black);
|
||||
|
||||
leftEye.set_color(Color::black);
|
||||
rightEye.set_color(Color::black);
|
||||
|
||||
mouth.add(Point{ p.x - r / 2, p.y + r / 25 });
|
||||
mouth.add(Point{ p.x + r / 2, p.y + r / 25 });
|
||||
mouth.set_color(Color::black);
|
||||
mouth.set_style(Line_style(Line_style::solid, 3));
|
||||
}
|
||||
|
||||
void AwkwardFace::attach_to(Graph_lib::Window & win)
|
||||
{
|
||||
Face::attach_to(win);
|
||||
win.attach(leftEye);
|
||||
win.attach(rightEye);
|
||||
win.attach(mouth);
|
||||
}
|
||||
113
Oving7/Oving 7/Emoji.h
Normal file
113
Oving7/Oving 7/Emoji.h
Normal file
@@ -0,0 +1,113 @@
|
||||
#pragma once
|
||||
|
||||
// Include Graph_lib library files that holds declarations needed for Window,
|
||||
// and Shape derivatives.
|
||||
#include "Graph.h"
|
||||
#include "GUI.h"
|
||||
|
||||
// This part is only relevant for non-Windows users in 2019.
|
||||
// Windows users has Graph_lib::Arc, Mac don't.
|
||||
#ifndef WIN32
|
||||
#include "Graph_lib.h"
|
||||
#endif
|
||||
|
||||
using namespace Graph_lib;
|
||||
|
||||
class Emoji
|
||||
{
|
||||
public:
|
||||
// Disable copying. Disable slicing, etc.
|
||||
Emoji(const Emoji&) = delete;
|
||||
Emoji& operator=(const Emoji&) = delete;
|
||||
|
||||
Emoji() {}
|
||||
|
||||
virtual void attach_to(Graph_lib::Window&) = 0;
|
||||
|
||||
|
||||
virtual ~Emoji() {}
|
||||
};
|
||||
|
||||
// A yellow, empty face.
|
||||
// An abstract class.
|
||||
class Face : public Emoji
|
||||
{
|
||||
public:
|
||||
Face(const Face&) = delete;
|
||||
Face& operator=(const Face&) = delete;
|
||||
virtual ~Face() {}
|
||||
|
||||
Face(Point c, int r);
|
||||
void attach_to(Graph_lib::Window& win) override;
|
||||
|
||||
private:
|
||||
Circle faceMask;
|
||||
};
|
||||
|
||||
|
||||
class EmptyFace : public Face
|
||||
{
|
||||
public:
|
||||
EmptyFace(Point p, int r);
|
||||
void attach_to(Graph_lib::Window& win) override;
|
||||
private:
|
||||
Circle leftEye;
|
||||
Circle rightEye;
|
||||
};
|
||||
|
||||
class SmileyFace : public EmptyFace
|
||||
{
|
||||
public:
|
||||
SmileyFace(Point p, int r);
|
||||
virtual ~SmileyFace() {};
|
||||
void attach_to(Graph_lib::Window& win) override;
|
||||
private:
|
||||
Arc Smile;
|
||||
};
|
||||
|
||||
|
||||
class SadFace : public EmptyFace
|
||||
{
|
||||
public:
|
||||
SadFace(Point p, int r);
|
||||
virtual ~SadFace() {};
|
||||
void attach_to(Graph_lib::Window& win) override;
|
||||
private:
|
||||
Arc Sad;
|
||||
};
|
||||
|
||||
class AngryFace : public EmptyFace
|
||||
{
|
||||
public:
|
||||
AngryFace(Point p, int r);
|
||||
virtual ~AngryFace() {};
|
||||
void attach_to(Graph_lib::Window& win) override;
|
||||
private:
|
||||
int x1, y1;
|
||||
int x2, y2;
|
||||
Arc AngryOver;
|
||||
Line leftBrow, rightBrow;
|
||||
};
|
||||
|
||||
class WinkingFace : public Face
|
||||
{
|
||||
public:
|
||||
WinkingFace(Point p, int r);
|
||||
void attach_to(Graph_lib::Window& win) override;
|
||||
private:
|
||||
Circle leftEye;
|
||||
Arc smile;
|
||||
Open_polyline wink;
|
||||
int x1,x2;
|
||||
int y1, y2, y3;
|
||||
};
|
||||
|
||||
class AwkwardFace : public Face
|
||||
{
|
||||
public:
|
||||
AwkwardFace(Point p, int r);
|
||||
void attach_to(Graph_lib::Window& win) override;
|
||||
private:
|
||||
Circle leftEye, rightEye;
|
||||
Open_polyline mouth;
|
||||
};
|
||||
10
Oving7/Oving 7/Face.h
Normal file
10
Oving7/Oving 7/Face.h
Normal file
@@ -0,0 +1,10 @@
|
||||
#pragma once
|
||||
#include "Emoji.h"
|
||||
class Face :
|
||||
public Emoji
|
||||
{
|
||||
public:
|
||||
Face();
|
||||
virtual ~Face();
|
||||
};
|
||||
|
||||
14
Oving7/Oving 7/Graph_lib.cpp
Normal file
14
Oving7/Oving 7/Graph_lib.cpp
Normal file
@@ -0,0 +1,14 @@
|
||||
#ifndef WIN32
|
||||
// If this is not a Windows computer, read this file.
|
||||
|
||||
#include "Graph_lib.h"
|
||||
|
||||
void Graph_lib::Arc::draw_lines() const
|
||||
{
|
||||
if (color().visibility()) {
|
||||
fl_color(color().as_int());
|
||||
fl_arc(point(0).x, point(0).y, w, h, start_deg, end_deg);
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
39
Oving7/Oving 7/Graph_lib.h
Normal file
39
Oving7/Oving 7/Graph_lib.h
Normal file
@@ -0,0 +1,39 @@
|
||||
#pragma once
|
||||
|
||||
#ifndef WIN32
|
||||
// If this is not a Windows computer, read this file.
|
||||
|
||||
// Code that extends Graph_lib for exercise 7.
|
||||
// Not relevant for Windows users.
|
||||
|
||||
#include "Graph.h"
|
||||
|
||||
namespace Graph_lib {
|
||||
|
||||
// For a description of this class, refer to the exercise text.
|
||||
class Arc : public Graph_lib::Shape
|
||||
{
|
||||
public:
|
||||
Arc(Point center, int w, int h, int sd, int ed)
|
||||
: w{w}, h{h}, start_deg{sd}, end_deg{ed}
|
||||
{
|
||||
add(Point{center.x - w / 2, center.y - h / 2});
|
||||
}
|
||||
|
||||
void draw_lines() const override;
|
||||
|
||||
void set_start(int d) { start_deg = d; }
|
||||
void set_end(int d) { end_deg = d; }
|
||||
void setw(int w) { this->w = w; }
|
||||
void seth(int h) { this->h = h; }
|
||||
|
||||
private:
|
||||
int w;
|
||||
int h;
|
||||
int start_deg;
|
||||
int end_deg;
|
||||
};
|
||||
|
||||
} // namespace Graph_lib
|
||||
|
||||
#endif
|
||||
162
Oving7/Oving 7/Oving 7.vcxproj
Normal file
162
Oving7/Oving 7/Oving 7.vcxproj
Normal file
@@ -0,0 +1,162 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="Emoji.cpp" />
|
||||
<ClCompile Include="main.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="Emoji.h" />
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<VCProjectVersion>15.0</VCProjectVersion>
|
||||
<ProjectGuid>{5dd82174-56a0-44b0-a0d8-4c2f7cf008b9}</ProjectGuid>
|
||||
<RootNamespace>Oving_7</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>10.0.17763.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="Shared">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<IncludePath>C:\Program Files\TDT4102\includes;$(ProjectDir);C:\Program Files\TDT4102\Graph_lib\Graph;$(VCInstallDir);C:\Program Files\TDT4102\FLTK_1.3.4-2;$(IncludePath)</IncludePath>
|
||||
<LibraryPath>C:\Program Files\TDT4102\Graph_lib\lib32;C:\Program Files\TDT4102\FLTK_1.3.4-2\lib32;$(LibraryPath)</LibraryPath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<IncludePath>C:\Program Files\TDT4102\includes;$(ProjectDir);C:\Program Files\TDT4102\Graph_lib\Graph;$(VCInstallDir);C:\Program Files\TDT4102\FLTK_1.3.4-2;$(IncludePath)</IncludePath>
|
||||
<LibraryPath>C:\Program Files\TDT4102\Graph_lib\lib32;C:\Program Files\TDT4102\FLTK_1.3.4-2\lib32;$(LibraryPath)</LibraryPath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<IncludePath>C:\Program Files\TDT4102\includes;$(ProjectDir);C:\Program Files\TDT4102\Graph_lib\Graph;$(VCInstallDir);C:\Program Files\TDT4102\FLTK_1.3.4-2;$(IncludePath)</IncludePath>
|
||||
<LibraryPath>C:\Program Files\TDT4102\Graph_lib\lib64;C:\Program Files\TDT4102\FLTK_1.3.4-2\lib64;$(LibraryPath)</LibraryPath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<IncludePath>C:\Program Files\TDT4102\includes;$(ProjectDir);C:\Program Files\TDT4102\Graph_lib\Graph;$(VCInstallDir);C:\Program Files\TDT4102\FLTK_1.3.4-2;$(IncludePath)</IncludePath>
|
||||
<LibraryPath>C:\Program Files\TDT4102\Graph_lib\lib64;C:\Program Files\TDT4102\FLTK_1.3.4-2\lib64;$(LibraryPath)</LibraryPath>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
<PreprocessorDefinitions>NOGDI;WIN32;_MBCS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>Graph_libd.lib;fltkd.lib;wsock32.lib;comctl32.lib;fltkjpegd.lib;fltkimagesd.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalOptions>/ignore:4099 %(AdditionalOptions)</AdditionalOptions>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
<PreprocessorDefinitions>NOGDI;WIN32;_MBCS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>Graph_libd.lib;fltkd.lib;wsock32.lib;comctl32.lib;fltkjpegd.lib;fltkimagesd.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalOptions>/ignore:4099 %(AdditionalOptions)</AdditionalOptions>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
<PreprocessorDefinitions>NOGDI;WIN32;_MBCS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<AdditionalDependencies>Graph_lib.lib;fltk.lib;wsock32.lib;comctl32.lib;fltkjpeg.lib;fltkimages.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalOptions>/ignore:4099 %(AdditionalOptions)</AdditionalOptions>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
<PreprocessorDefinitions>NOGDI;WIN32;_MBCS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<AdditionalDependencies>Graph_lib.lib;fltk.lib;wsock32.lib;comctl32.lib;fltkjpeg.lib;fltkimages.lib;;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalOptions>/ignore:4099 %(AdditionalOptions)</AdditionalOptions>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
30
Oving7/Oving 7/Oving 7.vcxproj.filters
Normal file
30
Oving7/Oving 7/Oving 7.vcxproj.filters
Normal file
@@ -0,0 +1,30 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="Source Files">
|
||||
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Header Files">
|
||||
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||
<Extensions>h;hh;hpp;hxx;hm;inl;inc;ipp;xsd</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Resource Files">
|
||||
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="main.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Emoji.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="Emoji.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
37
Oving7/Oving 7/main.cpp
Normal file
37
Oving7/Oving 7/main.cpp
Normal file
@@ -0,0 +1,37 @@
|
||||
#include "Simple_window.h"
|
||||
#include "Emoji.h"
|
||||
|
||||
// Size of window and emoji radius
|
||||
constexpr int xmax = 750;
|
||||
constexpr int ymax = 200;
|
||||
constexpr int emojiRadius = 50;
|
||||
|
||||
void DrawEmojies(Vector_ref<Emoji>& emojis, Graph_lib::Window& win);
|
||||
|
||||
int main()
|
||||
{
|
||||
using namespace Graph_lib;
|
||||
|
||||
const Point tl{100, 100};
|
||||
const string win_label{"Emoji factory"};
|
||||
Simple_window win{tl, xmax, ymax, win_label};
|
||||
Vector_ref<Emoji> emoji;
|
||||
emoji.push_back(new EmptyFace(Point{ 100, 100 }, emojiRadius));
|
||||
emoji.push_back(new SmileyFace(Point{ 210, 100 }, emojiRadius));
|
||||
emoji.push_back(new SadFace(Point{ 320, 100 }, emojiRadius));
|
||||
emoji.push_back(new AngryFace(Point{ 430, 100 }, emojiRadius));
|
||||
emoji.push_back(new WinkingFace(Point{ 540, 100 }, emojiRadius));
|
||||
emoji.push_back(new AwkwardFace(Point{ 650, 100 }, emojiRadius));
|
||||
|
||||
DrawEmojies(emoji, win);
|
||||
|
||||
win.wait_for_button();
|
||||
}
|
||||
|
||||
void DrawEmojies(Vector_ref<Emoji>& emojis, Graph_lib::Window & win)
|
||||
{
|
||||
for (const auto e : emojis)
|
||||
{
|
||||
e->attach_to(win);
|
||||
}
|
||||
}
|
||||
BIN
Oving7/Øving_7(19.feb).pdf
Normal file
BIN
Oving7/Øving_7(19.feb).pdf
Normal file
Binary file not shown.
Reference in New Issue
Block a user