mirror of
https://git.femboyfinancial.jp/james/lipsync.git
synced 2025-01-17 20:39:04 -08:00
git-svn-id: http://svn.sourceforge.jp/svnroot/lipsync@15 b1f601f4-4f45-0410-8980-aecacb008692
This commit is contained in:
parent
c089432c27
commit
509251c800
@ -2,6 +2,9 @@
|
||||
Microsoft Visual Studio Solution File, Format Version 10.00
|
||||
# Visual C# Express 2008
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LipSync", "LipSync\LipSync.csproj", "{15B51EEA-0D7F-4B59-AC7B-879A7BDB4A56}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{604390C3-BA02-4583-8C41-7B3B14437D6F} = {604390C3-BA02-4583-8C41-7B3B14437D6F}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IPlugin", "IPlugin\IPlugin.csproj", "{FB0C1FBD-3CB7-46BF-8E39-57BE2C8D1F00}"
|
||||
EndProject
|
||||
@ -25,6 +28,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "bocoree", "..\bocoree\bocor
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Boare.Lib.Swf", "..\Boare.Lib.Swf\Boare.Lib.Swf.csproj", "{D861973B-3BC6-4F52-83BE-49A8C269C09F}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OverlayImpeller", "OverlayImpeller\OverlayImpeller.csproj", "{604390C3-BA02-4583-8C41-7B3B14437D6F}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
@ -79,6 +84,10 @@ Global
|
||||
{D861973B-3BC6-4F52-83BE-49A8C269C09F}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{D861973B-3BC6-4F52-83BE-49A8C269C09F}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{D861973B-3BC6-4F52-83BE-49A8C269C09F}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{604390C3-BA02-4583-8C41-7B3B14437D6F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{604390C3-BA02-4583-8C41-7B3B14437D6F}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{604390C3-BA02-4583-8C41-7B3B14437D6F}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{604390C3-BA02-4583-8C41-7B3B14437D6F}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
@ -434,6 +434,10 @@
|
||||
<Project>{6CBD22A6-34C4-4444-8F90-9EE0D150CEC1}</Project>
|
||||
<Name>NicoComment</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\OverlayImpeller\OverlayImpeller.csproj">
|
||||
<Project>{604390C3-BA02-4583-8C41-7B3B14437D6F}</Project>
|
||||
<Name>OverlayImpeller</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\VFlip\VFlip.csproj">
|
||||
<Project>{E5F9AD85-0C02-4286-AC4C-F5B34EA10650}</Project>
|
||||
<Name>VFlip</Name>
|
||||
|
84
trunk/LipSync/OverlayImpeller/OverlayImpeller.cs
Normal file
84
trunk/LipSync/OverlayImpeller/OverlayImpeller.cs
Normal file
@ -0,0 +1,84 @@
|
||||
using System;
|
||||
using Plugin;
|
||||
using System.Drawing;
|
||||
using System.Windows.Forms;
|
||||
|
||||
public class OverlayImpeller : IPlugin {
|
||||
private string m_config;
|
||||
|
||||
/// <summary>
|
||||
/// フレームに加工を施す関数
|
||||
/// </summary>
|
||||
/// <param name="frame">加工の対象</param>
|
||||
/// <param name="time">ビデオの先頭からの時刻(秒)</param>
|
||||
/// <param name="e_begin">エントリの開始時刻</param>
|
||||
/// <param name="e_body">エントリの終了時刻</param>
|
||||
/// <param name="e_end">エントリの設定値</param>
|
||||
public void Apply( ref Bitmap frame, float time, float e_begin, float e_end, ref string e_body ) {
|
||||
double rpm = 11.5821;
|
||||
int centerx = 135;
|
||||
int centery = 135;
|
||||
int impeller_diameter = 153;
|
||||
int impeller_height_half = 12;
|
||||
double theta0 = 0.0;
|
||||
|
||||
double omega = 2.0 * Math.PI / (60.0 / rpm);
|
||||
double theta = theta0 + time * omega;
|
||||
int current_width = Math.Abs( (int)(impeller_diameter * Math.Cos( theta ) / 2.0) );
|
||||
using ( Graphics g = Graphics.FromImage( frame ) ) {
|
||||
g.DrawRectangle( new Pen( Color.Black, 2 ), new Rectangle( centerx - current_width, centery - impeller_height_half, current_width * 2, impeller_height_half * 2 ) );
|
||||
}
|
||||
}
|
||||
|
||||
public void ApplyLanguage( string lang ) {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// プラグインの名称
|
||||
/// </summary>
|
||||
public string Name {
|
||||
get {
|
||||
return "OverlayImpeller";
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// プラグインの簡潔な説明文。
|
||||
/// </summary>
|
||||
public string Abstract {
|
||||
get {
|
||||
return "OverlayImpeller";
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// プラグイン用の設定値を格納した文字列を指定します。
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public string Config {
|
||||
get {
|
||||
return m_config;
|
||||
}
|
||||
set {
|
||||
m_config = value;
|
||||
}
|
||||
}
|
||||
|
||||
public DialogResult BaseSetting() {
|
||||
return DialogResult.Cancel;
|
||||
}
|
||||
|
||||
public DialogResult EntrySetting( ref string entry_setting ) {
|
||||
return DialogResult.Cancel;
|
||||
}
|
||||
|
||||
public void Render( Graphics g, Size size, float time, string mouth, string Reserved ) {
|
||||
}
|
||||
|
||||
public ulong Type {
|
||||
get {
|
||||
return Constants.LS_NO_EVENT_HANDLER | Constants.LS_ENABLES_ENTRY_SETTING;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
56
trunk/LipSync/OverlayImpeller/OverlayImpeller.csproj
Normal file
56
trunk/LipSync/OverlayImpeller/OverlayImpeller.csproj
Normal file
@ -0,0 +1,56 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>9.0.21022</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{604390C3-BA02-4583-8C41-7B3B14437D6F}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>OverlayImpeller</RootNamespace>
|
||||
<AssemblyName>OverlayImpeller</AssemblyName>
|
||||
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<StartupObject>
|
||||
</StartupObject>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\IPlugin\IPlugin.csproj">
|
||||
<Project>{FB0C1FBD-3CB7-46BF-8E39-57BE2C8D1F00}</Project>
|
||||
<Name>IPlugin</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="OverlayImpeller.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
</ItemGroup>
|
||||
</Project>
|
Loading…
Reference in New Issue
Block a user