procedure TForm1.PaintImage;
begin
{获得panel的设备环境}
MyDisplayDC := GetDC(Panel1.Handle);
{删除当前图像}
Panel1.Repaint;
{获得用户自定义值}
ReadUserRequest;
{将映射模式设置为选择的值}
SetMapMode(MyDisplayDC, MyMapMode);
if Checkbox1.Checked
then SetWindowOrgEx(MyDisplayDC, WOrigin.x, WOrigin.y, nil);
if Checkbox2.Checked
then SetViewportOrgEx(MyDisplayDC, VOrigin.x, VOrigin.y, nil);
if Checkbox3.Checked
then SetWindowExtEx(MyDisplayDC, WExt.x, WExt.y, nil);
if Checkbox4.Checked
then SetViewportExtEx(MyDisplayDC, VExt.x, VExt.y, nil);