?? gdslideeffect.cs.svn-base
字號:
using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;
using Aspecto.GapiDrawNet;
using System.Drawing;
namespace Aspecto.FlowFX
{
[Obsolete("Use PocketFrog (Pf) Effects")]
public class GdSlideEffect : GapiDrawEffect
{
public override void Swap(FlowForm lastForm, FlowForm nextForm, bool opening)
{
base.Swap(lastForm,nextForm,opening);
int multiplier = opening ? -1 : 1;
GapiSurface surface = TakeScreenShot(-lastForm.Bounds.Y);
GapiSurface surface2 = new GapiSurface(surface.GapiDraw);
surface2.CreateSurface(surface);
GDRect gr;
if (opening)
gr = new GDRect(0, nextForm.Bounds.Y, surface2.Width, nextForm.Bounds.Y + nextForm.Height);
else
gr = new GDRect(0, lastForm.Bounds.Y, surface2.Width, lastForm.Bounds.Y + lastForm.Height);
surface2.FillRect(gr, GapiUtility.RGB(nextForm.BackColor));
gapiDisplay.BackBuffer.SetClipper(0, 0, gapiDisplay.BackBuffer.Width, gapiDisplay.BackBuffer.Height);
int frame = 1;
while (frame < Screen.PrimaryScreen.Bounds.Width)
{
gapiDisplay.BackBuffer.Blt(surface, frame * multiplier, 0);
gapiDisplay.BackBuffer.Blt(surface2, (frame * multiplier) + (surface.Width * multiplier * -1), 0);
gapiDisplay.Flip();
frame += Math.Max(1, (int)(Math.Abs(frame) * 0.4));
}
surface.Dispose();
surface2.Dispose();
DrawStartBar();
}
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -