GdiPlus[38]: IGPGraphicsPath (五) 路徑標記

IGPGraphicsPath.SetMarker //建立一個標記IGPGraphicsPath.ClearMarkers //取消全部標記在路徑中每建立一個圖形都可以同時做個 Marker,真正使用這些個標記時, 主要通過 IGPGraphicsPathIterator 的 NextMarker() 方法.下面是建立並遍曆 Marker 的示範代碼, 暫未使用 IGPGraphicsPathIterator.uses GdiPlus;procedure

GdiPlus[39]: IGPGraphicsPath (六) – 路徑的協助工具輔助 IGPGraphicsPathIterator

IGPGraphicsPathIterator 能遍曆路徑中的子路徑和路徑標記.IGPGraphicsPathIterator.Count; { 點總數 }IGPGraphicsPathIterator.SubpathCount; { 子路徑數 }IGPGraphicsPathIterator.HasCurve; { 是否包含曲線 }IGPGraphicsPathIterator.Rewind; { 重新開始, 用於遍曆前

GdiPlus[40]: 不該忽略的一些基礎結構

這些基礎結構有: TGPSize、TGPSizeF、TGPPoint、TGPPointF、TGPRect、TGPRectF.它們自身提供了一些方便的功能, 如果早看看的話前面的很多代碼能更精簡些.TGPPoint 或 TGPPointF 方便的功能:1、因為已經重載了 Add、Subtract 運算子, 所以 "點" 可以 + 或 -;2、可使用 Equals 函數對比是否一致.var Pt1,Pt2,Pt3: TGPPoint; b: Boolean;begin

GdiPlus[41]: IGPRegion 地區

// 地區建立:TGPRegion.Create(); { 參數可以是矩形、路徑、HRGN、地區資料, 或無參}TGPRegion.FromHRGN(); { 從 HRGN 初始化 }// 地區運算(矩形、路徑、或另一個地區):IGPRegion.Intersect(); { 交集 }IGPRegion.Union(); { 並集 }IGPRegion.Exclude(); { 減去 }IGPRegion.ExclusiveOr(); { 減去交集

GdiPlus[42]: IGPGraphics (一)

//方法IGPGraphics.DrawLine(); { 畫線 }IGPGraphics.DrawLines(); { 畫一組線 }IGPGraphics.DrawArc(); { 畫弧線 }IGPGraphics.DrawBezier(); { 畫 Bezier 線 }IGPGraphics.DrawBeziers(); { 畫一組 Bezier 線

GdiPlus[46]: IGPMatrix 矩陣(一)

認識矩陣, 譬如這是一個 2*3 (2 行 3 列) 的矩陣:┏ ┓┃3 1 4┃┃2 5 0┃┗ ┛矩陣相加的例子:┏ ┓ ┏ ┓ ┏ ┓┃1 0┃ ┃2 4┃ ┃3 4┃┃0 2┃ + ┃1 5┃ = ┃1 7┃┃1 3┃ ┃0 6┃ ┃1 9┃┗ ┛ ┗ ┛ ┗ ┛在 GDI+ 中應用的矩陣運算是 "相乘".矩陣相乘有個前提: 就是第一個矩陣的 "列數" 要和第二個矩陣的

通過 SHGetSpecialFolderLocation、SHGetPathFromIDList 函數擷取常用路徑

本例:代碼檔案:unit Unit1;interfaceuses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls;type TForm1 = class(TForm) Memo1: TMemo; procedure FormCreate(Sender: TObject); end;var Form1:

GdiPlus[47]: IGPMatrix 矩陣(二)

IGPMatrix 的屬性與方法://方法IGPMatrix.Reset; { 重設 Matrix 得到單位矩陣(斜對角線是1其他是0) }IGPMatrix.Translate(); { 平移 }IGPMatrix.Scale(); { 放縮 }IGPMatrix.Rotate(); { 旋轉(沿(0,0)點, 順時針) }IGPMatrix.RotateAt(); { 沿指定點, 順時針旋轉 }

GdiPlus[36]: IGPGraphicsPath (三) 路徑中的資料

IGPGraphicsPath.PointCount; // 點總數IGPGraphicsPath.PathPoints; // 點數組, 浮點型IGPGraphicsPath.PathPointsI; // 點數組, 整型IGPGraphicsPath.PathTypes; // 點類型數組IGPGraphicsPath.PathData; // 點與點類型資料, IGPPathData 類型IGPGraphicsPath.GetLastPoint; //

GdiPlus[54]: 映像(六) 映像解碼與編碼

GDI+ 能夠開啟某種格式的映像, 就會有對應的解碼器; 能夠儲存為某種格式, 也會有對應的編碼器.下面程式通過 IGPImageCodecInfoArray 與 IGPImageCodecInfo 擷取了 GDI+ 能夠編碼與解碼的格式:uses GdiPlus;procedure TForm1.Button1Click(Sender: TObject);var Encoders, Decoders: IGPImageCodecInfoArray; Encoder, Decoder:

GdiPlus[44]: IGPGraphics (三) 關於文本繪製續 – IGPStringFormat

IGPStringFormat 的方法和屬性://方法:IGPStringFormat.GetTabStops(); { 擷取製表位 }IGPStringFormat.SetTabStops(); { 設定製表位 }IGPStringFormat.SetDigitSubstitution(); { 指定用本地數字替換西方數字時使用的語言和方法

GdiPlus[48]: IGPMatrix 矩陣(三) 關於矩陣的旋轉

矩陣旋轉一個角度, 會關聯到 M11、M12、M21、M22 四個資料, 計算公式如下:┏ ┓┃ cos(r) sin(r) 0┃┃-sin(r) cos(r) 0┃┃ DX DY 1┃┗ ┛//其中的 r 不是角度是弧度; 弧度的計算方法是: r = 角度 * Pi / 180.下面兩段程式對上面的公式進行了對比測試://var m: IGPMatrix;begin m :=

GdiPlus[45]: IGPGraphics (四) 關於呈現品質與合成模式

相關內容有:IGPGraphics.SmoothingMode; { 繪圖品質 }IGPGraphics.InterpolationMode; { 插補模式 }IGPGraphics.CompositingMode; { 前景色彩與背景色的合成混合模式 }IGPGraphics.CompositingQuality; { 映像合成品質 }IGPGraphics.PixelOffsetMode; {

GdiPlus[55]: 映像(七) 映像編碼的參數

通過 IGPImage.GetEncoderParameterList 可以擷取指定編碼格式的參數列表;通過此列表可以遍曆出各參數的指標: PGPNativeEncoderParameter(TGPNativeEncoderParameter 的指標);TGPNativeEncoderParameter 是一個結構體:TGPNativeEncoderParameter = record Guid: TGUID; { 參數標識 }

GdiPlus[49]: 映像(一) 概覽

三個主要的映像相關介面是: IGPImage、IGPBitmap、IGPMetafile.IGPBitmap、IGPMetafile 都是從 IGPImage 繼承, 分別用於處理位元影像和圖元檔案.還有從 IGPBitmap 繼承的 IGPCachedBitmap 用於快速呈現映像.IGPImage 的方法與屬性://方法IGPImage.Clone; { 複製 }IGPImage.Save(); {

GdiPlus[50]: 映像(二) 關於 Create

IGPImage 類提供的 Create 方法:Image := TGPImage.Create(檔案(或流), Boolean);//其中的布爾值預設 False; 如果為 True 則使用檔案(或流)中的已嵌入顏色管理資訊來進行顏色校正.{ 樣本1: 從檔案建立 }var Graphics: IGPGraphics; Image: IGPImage;begin Image := TGPImage.Create('C:\GdiPlusImg\Grapes.jpg');

GdiPlus[51]: 映像(三) 關於呈現

相關方法:IGPGraphics.DrawImage();IGPImage.GetThumbnailImage();IGPImage.RotateFlip();用 DrawImage 呈現映像時, 是否指定 Width 和 Height 的區別://如果映像的解析度與 Graphics 的解析度不一致, 則指定 Width、Height 是有必要的.uses GdiPlus;procedure TForm1.FormPaint(Sender: TObject);var Graphics:

官方的Regex組件 RegularExpressions (1) : 基本應用

剛剛試了一下 DelphiXE 新增的Regex組件, 它基於 C 語言編寫的 PCRE 庫實現, 感覺設計的非常好。其主要的 TRegEx 被設計為一個結構(而不是類), 可能是基於效率的考慮;不過它主要調用了 TPerlRegEx 類的功能。TRegEx 的五個主要方法 IsMatch()、Match()、Matches()、Replace()、Split() 都有相應的 class 方法,所以一般情況下根本不需要手動執行個體化對象,直接使用 class

GdiPlus[52]: 映像(四) 映像資訊

相關屬性、方法、函數:IGPImage.Width; { 寬度(單位是像素) }IGPImage.Height; { 高度(單位是像素) }IGPImage.HorizontalResolution; { 擷取水平解析度(以"像素/英寸"為單位) }IGPImage.VerticalResolution; { 擷取垂直解析度(以"像素/英寸"為單位) }IGPImage.RawFormat; {

GdiPlus[53]: 映像(五) 映像的屬性(映像中繼資料)

相關方法和屬性:IGPImage.GetPropertyItem(); { 擷取屬性項 }IGPImage.SetPropertyItem(); { 設定屬性項 }IGPImage.RemovePropertyItem(); { 刪除屬性項 }IGPImage.PropertyIdList; { 擷取映像屬性 ID 數組 }IGPImage.PropertyItems; { 擷取映像屬性集合 }IGPImage.PropertyItems 指向一個

總頁數: 61357 1 .... 4751 4752 4753 4754 4755 .... 61357 Go to: 前往

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.