?? pfslideeffect.cs.svn-base
字號:
using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;
using Aspecto.PocketFrog;
using System.Drawing;
namespace Aspecto.FlowFX
{
public class PfSlideEffect : PocketFrogEffect
{
public override void Swap(FlowForm lastForm, FlowForm nextForm, bool opening)
{
base.Swap(lastForm, nextForm, opening);
int multiplier = opening ? -1 : 1;
Surface surface = TakeScreenShot(-lastForm.Bounds.Y);
Surface surface2 = surface.Clone();
Rect gr;
if (opening)
gr = new Rect(0, nextForm.Bounds.Y, surface2.Width, nextForm.Bounds.Y + nextForm.Height);
else
gr = new Rect(0, lastForm.Bounds.Y, surface2.Width, lastForm.Bounds.Y + lastForm.Height);
Rasterizer rast = new Rasterizer(surface2);
rast.FillRect(gr, PFUtility.RGB(nextForm.BackColor));
display.GetBackBuffer();
display.SetClipping(new Rect(0, 0, display.GetWidth(), display.GetHeight()));
int frame = 1;
// int FPSLastTime = Environment.TickCount;
// int FPSTicksPerFrame = 1000 / 30;
while (frame < Screen.PrimaryScreen.Bounds.Width)
{
//while (Environment.TickCount - FPSLastTime < FPSTicksPerFrame) { }
//FPSLastTime = Environment.TickCount;
display.GetBackBuffer();
display.Blit(frame * multiplier, 0, surface, new Rect(0, 0, surface.Width, surface.Height));
display.Blit((frame * multiplier) + (surface.Width * multiplier * -1), 0, surface2, new Rect(0, 0, surface2.Width, surface2.Height));
display.Update();
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 + -