亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? lcdscreen.pas.svn-base

?? LCDScreen is a couple of Delphi component which simulate a dot-LCD multilines screen. It is fully c
?? SVN-BASE
?? 第 1 頁 / 共 5 頁
字號:
  begin
    FontWidth := 11;
    FontHeight := 11;
  end;

  if mbLeft   in FDotMatrixBorders then Inc(FontWidth);
  if mbRight  in FDotMatrixBorders then Inc(FontWidth);
  if mbTop    in FDotMatrixBorders then Inc(FontHeight);
  if mbBottom in FDotMatrixBorders then Inc(FontHeight);
  
  if FCharBitmap<>0 then
  begin
    SelectObject(FCharDC, FOCharBitmap);
    DeleteObject(FCharBitmap);
  end;

  FCharBitmap := CreateCompatibleBitmap(FCharDC, FontWidth*2, FontHeight+1);
  SelectObject(FCharDC, FFont.Handle);
  FOCharBitmap := SelectObject(FCharDC, FCharBitmap);
end;

procedure TLCDScreen.Resize;
begin
  inherited Resize;

  UpdateInternalMatrixBitmap;
end;

////////////////////////////////////////////////////////////////////////////////
//
// Create Virgin and Black Matrix.
//
////////////////////////////////////////////////////////////////////////////////

procedure TLCDScreen.UpdateInternalMatrixBitmap;
  procedure DrawOnePixelX(DC: HDC; PixelSize: TPixelsize; PixelShape: TPixelShape;
                         Color: TColor; psx, psy: Byte; tx, ty: Integer);
  begin
       if PixelSize = pix1x1
       then SetPixel(DC, tx, ty, ColorToRGB(Color))
       else case PixelShape of
             psSquare:  Rectangle(DC, tx, ty, tx + psx, ty + psy); { Standard square pixels}
             psRound:   Ellipse(DC, tx, ty, tx + psx, ty + psy);   { Round pixels }
            end;
  end;
var
    tx, ty: Integer;
    bkBrush: HBRUSH;
    pBrush, poBrush: HBRUSH;
    pPen, poPen: HPEN;
    //FVirginMatrixBitmap, FBlackMatrixBitmap: TBitmap;
begin
  if Width*Height<=0 then exit;

  if Assigned(FVirginMatrixBitmap) then FVirginMatrixBitmap.Destroy;
  if Assigned(FBlackMatrixBitmap) then FBlackMatrixBitmap.Destroy;
  //DeleteObject(SelectObject(FVirginMatrixDC, FOVirginMatrixBitmap));
  //DeleteObject(SelectObject(FBlackMatrixDC, FOBlackMatrixBitmap));

  FVirginMatrixBitmap := TBitmap.Create;
  FVirginMatrixBitmap.Width := Width;
  FVirginMatrixBitmap.Height := Height;
  FVirginMatrixBitmap.Canvas.Brush.Color := FColor;
  FVirginMatrixBitmap.Canvas.FillRect(Rect(0, 0, Width, Height));

  pBrush := CreateSolidBrush(ColorToRGB(FTrueOffColor)); poBrush := SelectObject(FVirginMatrixBitmap.Canvas.Handle, pBrush);
  pPen := CreatePen(PS_SOLID, 1, ColorToRGB(FTrueOffColor)); poPen := SelectObject(FVirginMatrixBitmap.Canvas.Handle, pPen);
  ty := 0;
  while (ty<=Height) do
  begin
    tx := 0;
    while (tx<=Width) do
    begin
      DrawOnePixelX(FVirginMatrixBitmap.Canvas.Handle, FPixelSize, FPixelShape,
                     FTrueOffColor, psx, psy, tx, ty);

      tx := tx + psx + FPixelSpacing;
    end;

    ty := ty + psy + FPixelSpacing;
  end;
  SelectObject(FVirginMatrixBitmap.Canvas.Handle, poBrush); DeleteObject(pBrush);
  SelectObject(FVirginMatrixBitmap.Canvas.Handle, poPen); DeleteObject(pPen);

  FBlackMatrixBitmap := TBitmap.Create;
  FBlackMatrixBitmap.Width := Width;
  FBlackMatrixBitmap.Height := Height;
  FBlackMatrixBitmap.Canvas.Brush.Color := FColor;
  FBlackMatrixBitmap.Canvas.FillRect(Rect(0, 0, Width, Height));

  pBrush := CreateSolidBrush(ColorToRGB(FTrueOnColor)); poBrush := SelectObject(FBlackMatrixBitmap.Canvas.Handle, pBrush);
  pPen := CreatePen(PS_SOLID, 1, ColorToRGB(FTrueOnColor)); poPen := SelectObject(FBlackMatrixBitmap.Canvas.Handle, pPen);
  ty := 0;
  while (ty<=Height) do
  begin
    tx := 0;
    while (tx<=Width) do
    begin
      DrawOnePixelX(FBlackMatrixBitmap.Canvas.Handle, FPixelSize, FPixelShape,
                     FTrueOnColor, psx, psy, tx, ty);

      tx := tx + psx + FPixelSpacing;
    end;

    ty := ty + psy + FPixelSpacing;
  end;
  SelectObject(FBlackMatrixBitmap.Canvas.Handle, poBrush); DeleteObject(pBrush);
  SelectObject(FBlackMatrixBitmap.Canvas.Handle, poPen); DeleteObject(pPen);

  //FOVirginMatrixBitmap := SelectObject(FVirginMatrixDC, FVirginMatrixBitmap.ReleaseHandle);
  //FOBlackMatrixBitmap := SelectObject(FBlackMatrixDC, FBlackMatrixBitmap.ReleaseHandle);

  //FVirginMatrixBitmap.Destroy;
  //FBlackMatrixBitmap.Destroy;
end;


////////////////////////////////////////////////////////////////////////////////
//
// Repaint the component.
//
////////////////////////////////////////////////////////////////////////////////

procedure TLCDScreen.Paint;
var
  tempBitMap, tempBitmap2: TBitMap;
  inverse: Boolean;
begin
  if Visible   { Draw only real graphics if display is marked visible }
  then begin
         SetCorrectSize;

         inverse := false;

         if (spInverse in FSpecialEffects) then inverse := true;
         if (spBlinking in FSpecialEffects) and FBlinkingStatus then inverse := not inverse;

         tempBitmap := TBitMap.Create;
         tempBitmap.Height := Height;
         tempBitmap.Width  := Width;

         with tempBitmap.Canvas
         do begin                   { Border drawing on tempBitmap}
              Brush.Color := FColor;
              FillRect(Rect(0, 0, tempBitmap.Width, tempBitmap.Height));
              if FBorderStyle <> bsNone
              then begin
                     case FBorderStyle of
                        bsRaised:  Pen.Color := clBtnShadow;
                        bsLowered: Pen.Color := clBtnHighlight;
                       end;
                     PolyLine([Point(Width-1, 0), Point(Width-1, Height-1), Point(-1, Height-1)]);

                     case FBorderStyle of
                        bsRaised:  Pen.Color := clBtnHighlight;
                        bsLowered: Pen.Color := clBtnShadow;
                        end;
                     PolyLine([Point(Width - 1, 0), Point(0, 0), Point(0, Height - 1)]);
                     end;
              end;

          {
          if inverse then
          begin
            BitBlt(tempBitmap.Canvas.Handle,
                   FBorderSpace, FBorderSpace,
                   Width- 2 * FBorderSpace, Height- 2 * FBorderSpace,
                   FBlackMatrixBitmap.Canvas.Handle,
                   0,
                   0,
                   srcCopy);
          end
          else
          begin
            BitBlt(tempBitmap.Canvas.Handle,
                   FBorderSpace, FBorderSpace,
                   Width- 2 * FBorderSpace, Height- 2 * FBorderSpace,
                   FVirginMatrixBitmap.Canvas.Handle,
                   0,
                   0,
                   srcCopy);
          end;
          }
         if Enabled
         then begin
                tempBitmap2 := TBitMap.Create;
                tempBitmap2.Height := Height; // + 2 * (CharHeight + FBorderSpace + FLineSpacing);
                tempBitmap2.Width  := Width; //  + 2 * (CharWidth + FBorderSpace + FLineSpacing);
                //tempBitmap2.Canvas.Brush.Color := FColor;
                //tempBitmap2.Canvas.FillRect(Rect(0, 0, tempBitmap2.Width, tempBitmap2.Height));

                { Draw Backgroud Matrix }

                if inverse then
                begin
                  BitBlt(tempBitmap2.Canvas.Handle,
                         0, 0,
                         Width, Height,
                         FBlackMatrixBitmap.Canvas.Handle,
                         0,
                         0,
                         srcCopy);
                end
                else
                begin
                  BitBlt(tempBitmap2.Canvas.Handle,
                         0, 0,
                         Width, Height,
                         FVirginMatrixBitmap.Canvas.Handle,
                         0,
                         0,
                         srcCopy);
                end;

                { Characters drawing on tempBitmap2}
                DrawDisplayCharacters(tempBitmap2);

                { Copy characters from tempBitmap2 to tempBitmap bitmap }
                BitBlt(tempBitmap.Canvas.Handle,
                       FBorderSpace, FBorderSpace,
                       Width- 2 * FBorderSpace, Height- 2 * FBorderSpace,
                       tempBitMap2.Canvas.Handle,
                       CharWidth  + FCharSpacing - PixHRef * (FPixelWidth  + 1) - 1,
                       CharHeight + FLineSpacing - PixVRef * (FPixelHeight + 1) - 1,
                       srcCopy);

                tempBitmap2.Free;
                end;

         { Copy characters + border from tempBitmap to Window bitmap }
         //while Canvas.TryLock do Sleep(1);

         Canvas.Lock;
         try
           BitBlt(Canvas.Handle, 0, 0, Width, Height, tempBitMap.Canvas.Handle, 0, 0, srcCopy);
         finally
           Canvas.Unlock;
         end;

         tempBitMap.Free;
         end;
end;


////////////////////////////////////////////////////////////////////////////////
//
// Drawing routine for the display using FTempLines strings.
//
////////////////////////////////////////////////////////////////////////////////

procedure TLCDScreen.DrawDisplayCharacters(BitMap: TBitMap);
var
  row, col, maxcol, truerow, truecol: Integer;
  xpos, ypos: Integer;
  NullChar: TOneChar;
  dx: Integer;
begin
  NullChar.TheChar := space_char;
  NullChar.SpEff := 0;

  ypos := 0;

  for row := 0 to Lines.Count -1 do
  begin
       xpos := 0;
       maxcol := Length(Lines[row]);
       col := 0;
       truerow := (row + CharVref) mod TrueDisplayHeight;
       if truerow < 0 then truerow := TrueDisplayHeight + truerow;

       repeat
         truecol := (col+CharHref) mod TrueDisplayWidth;
         if truecol < 0 then truecol := TrueDisplayWidth + truecol;
         if Display[truerow][truecol].TheChar <> Char(0)
         then dx := DrawOneCharacter(BitMap, xpos, ypos, Display[truerow][truecol])
         else dx := DrawOneCharacter(BitMap, xpos, ypos, NullChar);

         xpos := xpos + (dx * psx)  + (dx  - 1) * FPixelSpacing + FCharSpacing;
         //xpos := xpos + CharWidth + FCharSpacing;
         Inc(col);
       until col >= maxcol;

       ypos := ypos + (FontHeight * psy) + (FontHeight - 1) * FPixelSpacing + FLineSpacing;

       if ypos>=Height then break;
  end;

  {
  for row := -1 to FNoOfLines + 1
  do begin
       xpos := 0;
       maxcol := FNoOfChars;
       col := 0;
       truerow := (row + CharVref) mod TrueDisplayHeight;
       if truerow < 0 then truerow := TrueDisplayHeight + truerow;

       repeat
         truecol := (col+CharHref) mod TrueDisplayWidth;
         if truecol < 0 then truecol := TrueDisplayWidth + truecol;
         if Display[truerow][truecol].TheChar <> Char(0)
         then dx := DrawOneCharacter(BitMap, xpos, ypos, Display[truerow][truecol])
         else dx := DrawOneCharacter(BitMap, xpos, ypos, NullChar);

         xpos := xpos + (dx * psx)  + (dx  - 1) * FPixelSpacing + FCharSpacing;
         //xpos := xpos + CharWidth + FCharSpacing;
         Inc(col);
       until col >= maxcol + 2;

       ypos := ypos + CharHeight + FLineSpacing;
       end; }
end;


////////////////////////////////////////////////////////////////////////////////
//
// Draw One Character ie Copy Vigin Matrix and then Draw only OnPixels.
//
////////////////////////////////////////////////////////////////////////////////

function TLCDScreen.DrawOneCharacter(BitMap: TBitMap; xpos, ypos: Integer; Display: TOneChar): Integer;
var
  x, y,
  topborder, leftborder: Byte;
  tx, ty, dx: Integer;
  pixcol: TColor;
  inverse: Boolean;
  size: TSize;
  col: COLORREF;
begin
  inverse := false;

  if Display.SpEff <> 0 then
  begin
     if ((Display.SpEff mod 2) = 0) and (spInverse in FSpecialEffects) then inverse := true;
     if ((Display.SpEff mod 3) = 0) and (spBlinking in FSpecialEffects) and FBlinkingStatus then inverse := not inverse;
  end;

  if inverse then pixcol := FTrueOffColor else pixcol := FTrueOnColor;
  if (Display.TheChar <> space_char){ Useless to try to draw OnPixels with 'space' character
                                      or to draw OffPixels with 'block' characters!      }
  then begin
    topborder := Ord(mbTop in FDotMatrixBorders);
    leftborder := Ord(mbLeft in FDotMatrixBorders);

    ty := ypos + topborder * (psy + FPixelSpacing);

    GetTextExtentPoint32(FCharDC, PChar(''+Display.TheChar), Length(''+Display.TheChar), size);
    dx := size.cx;

    FillRect(FCharDC, Rect(0, 0, FontWidth * 2, FontHeight+1), GetStockObject(WHITE_BRUSH));
    Textout(FCharDC, 0, 0, PChar(''+Display.TheChar), Length(''+Display.TheChar));

    for y := 0 to FontHeight do
    begin
      tx := xpos + leftborder * (psx + FPixelSpacing);

      for x := 0 to dx do
      begin
        if GetPixel(FCharDC, x, y)<>RGB(255,255,255) { then draw the OnPixels }
        then DrawOnePixel(Bitmap, FPixelSize, FPixelShape,
                         pixcol, psx, psy, tx, ty);
        tx := tx + psx + FPixelSpacing;
      end;
      ty := ty + psy + FPixelSpacing;
    end;
  end
  else
  begin
    dx := FFont.Size;
  end;


  if  ((Display.SpEff mod 5) = 0) and (spUnderLine in FSpecialEffects) and (Display.SpEff <> 0)
  then begin
         tx := xpos;
         ty := ypos + (FontHeight - 1) * (psy + FPixelSpacing);

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲h动漫在线| 国产传媒欧美日韩成人| 青青草国产成人99久久| www.欧美精品一二区| 欧美日韩不卡一区| 久久久777精品电影网影网| 亚洲一区二区偷拍精品| 波多野结衣中文字幕一区| 日韩午夜电影av| 亚洲精品自拍动漫在线| 国产一区视频网站| 欧美人动与zoxxxx乱| 亚洲精品网站在线观看| 风间由美一区二区三区在线观看 | 国产精品夫妻自拍| 丝袜诱惑亚洲看片| 91香蕉视频在线| 国产视频一区在线观看| 激情国产一区二区| 91精品国产欧美日韩| 亚洲免费在线视频一区 二区| 国产99久久久精品| 国产亚洲欧美激情| 精品一区二区三区的国产在线播放| 欧美喷水一区二区| 亚洲成国产人片在线观看| 色哟哟欧美精品| 17c精品麻豆一区二区免费| 国产盗摄精品一区二区三区在线| 精品国产区一区| 紧缚奴在线一区二区三区| 日韩一区二区免费视频| 免费看黄色91| 日韩视频免费直播| 久久av资源站| 国产亚洲欧美日韩日本| 北岛玲一区二区三区四区| 国产精品久久久久久久久动漫 | 在线观看不卡一区| 一区二区三区欧美久久| 色成年激情久久综合| 一二三区精品视频| 欧美日韩免费观看一区三区| 日韩电影在线一区二区三区| 欧美大黄免费观看| 国产一区二区在线电影| 国产欧美日韩三级| 色综合久久久久久久久| 亚洲一卡二卡三卡四卡| 91精品国产综合久久婷婷香蕉| 日本欧美在线看| 亚洲精品一区在线观看| 高清成人在线观看| 亚洲一区二区三区在线看| 欧美精品在线观看一区二区| 久久国产精品99精品国产 | 成人免费福利片| 亚洲精品国产精华液| 欧美一区二区三区思思人 | 美女mm1313爽爽久久久蜜臀| 精品国产乱码久久久久久牛牛 | 国产一区二区三区电影在线观看| 国产精品久久久久aaaa| 91国偷自产一区二区开放时间| 日韩精品一二区| 国产精品色眯眯| 欧美片在线播放| av在线一区二区| 日本三级亚洲精品| 亚洲视频在线一区观看| 日韩一区二区中文字幕| www..com久久爱| 免费的成人av| 亚洲女性喷水在线观看一区| 日韩亚洲欧美中文三级| 99在线视频精品| 九九精品一区二区| 亚洲欧美日韩电影| 久久综合狠狠综合久久激情| 在线观看欧美日本| 成人国产精品视频| 日韩av中文字幕一区二区三区| 国产精品免费视频网站| 日韩一区二区三区高清免费看看| www.日韩大片| 国产成人精品www牛牛影视| 午夜精品福利视频网站| 中文字幕一区二区三区视频| 精品乱码亚洲一区二区不卡| 欧美日本韩国一区| 99久久免费国产| 国产乱子伦一区二区三区国色天香| 亚洲免费色视频| 中文字幕成人在线观看| 日韩午夜精品电影| 欧美另类z0zxhd电影| 91在线观看成人| 不卡一二三区首页| 国产一区二三区好的| 男人的j进女人的j一区| 亚洲综合久久av| 亚洲六月丁香色婷婷综合久久| 亚洲国产精品激情在线观看| 精品国产髙清在线看国产毛片| 精品视频一区二区三区免费| 91久久精品一区二区三| 99re6这里只有精品视频在线观看| 国产福利91精品一区| 激情综合色丁香一区二区| 老司机免费视频一区二区三区| 日韩精品亚洲一区| 天天av天天翘天天综合网色鬼国产 | 91精品国产综合久久小美女| 欧美久久久影院| 欧美人妇做爰xxxⅹ性高电影 | 国产日韩欧美高清| 国产亚洲精品久| 国产女人aaa级久久久级 | 午夜精品在线视频一区| 一区二区三区产品免费精品久久75| 最新国产成人在线观看| 伊人色综合久久天天人手人婷| 亚洲欧美国产高清| 亚洲超丰满肉感bbw| 婷婷久久综合九色国产成人| 蜜桃一区二区三区在线观看| 久久精品免费看| 韩日av一区二区| 成人免费高清在线| 91久久久免费一区二区| 欧美一区二区三区精品| www欧美成人18+| 国产精品视频一二三区| 亚洲免费三区一区二区| 亚洲影院免费观看| 亚洲va欧美va人人爽| 男女性色大片免费观看一区二区| 激情丁香综合五月| av电影在线观看不卡| 欧美性高清videossexo| 日韩丝袜美女视频| 中文字幕第一区第二区| 亚洲第一福利视频在线| 麻豆精品国产91久久久久久| 粉嫩av亚洲一区二区图片| 91福利小视频| 精品对白一区国产伦| 亚洲素人一区二区| 蜜臀av性久久久久av蜜臀妖精| 国产精品正在播放| 在线观看国产日韩| 久久久久久免费| 亚洲一区二区三区四区不卡| 精品在线亚洲视频| 日本黄色一区二区| 精品国产91乱码一区二区三区 | 欧美变态口味重另类| 国产精品乱人伦中文| 三级成人在线视频| 国产suv精品一区二区883| 欧洲av在线精品| 国产亚洲欧美色| 日本v片在线高清不卡在线观看| 国产成人免费视频| 69成人精品免费视频| 国产精品久久久久久久久久久免费看| 视频一区国产视频| av中文一区二区三区| 久久久另类综合| 日韩精彩视频在线观看| 91麻豆6部合集magnet| 精品盗摄一区二区三区| 一区二区欧美视频| 成人影视亚洲图片在线| 日韩欧美国产不卡| 午夜精品视频一区| 91在线高清观看| 中文字幕不卡三区| 国产在线看一区| 日韩一级欧美一级| 亚洲va欧美va天堂v国产综合| 94-欧美-setu| 国产精品污www在线观看| 韩国欧美一区二区| 欧美一级在线视频| 香蕉加勒比综合久久| 91九色最新地址| 国产精品国产精品国产专区不蜜 | 九色porny丨国产精品| 欧美日韩亚洲综合在线 欧美亚洲特黄一级| 中文字幕国产一区| 国产精品一区二区在线观看不卡| 日韩视频一区二区在线观看| 秋霞国产午夜精品免费视频| 日韩一区二区免费视频| 日韩精品电影在线| 91精品国产综合久久婷婷香蕉| 日韩中文字幕亚洲一区二区va在线 | 国产suv一区二区三区88区| 久久蜜桃av一区二区天堂 |