Sign in Join
Wiki copytemporary

TBGRABitmap class: what changed

Revision 1 to 2. Removed lines have a minus sign; added lines have a plus sign.

OldNewLine
11Back to [[BGRABitmap]].
22
33*TBGRABitmap* class contains an image stored in BGRA 32-bit format. It derives from *TBGRADefaultBitmap* which derives from [[TBGRACustomBitmap and IBGRAScanner|TBGRACustomBitmap]] from which it inherits its properties. It is defined in [BGRABitmap unit](https://bgrabitmap.github.io/doc/BGRABitmap.html). It implements [[TBGRACustomBitmap and IBGRAScanner|IBGRAScanner]] interface which allows it to be used as a texture (like a brush).
44
55### Implementations
66
77*TBGRABitmap* is a shortcut provided by [BGRABitmap unit](https://bgrabitmap.github.io/doc/BGRABitmap.html) for the active implementation, depending on the widgetset. It can be one of the following:
88
99- *TBGRAWinBitmap* or *TBGRAMSEguiBitmap* on Windows
1010- *TBGRAGtkBitmap* on Gtk
1111- *TBGRAQtBitmap* when Qt widget is active
1212- *TBGRAfpGUIBitmap* when using the package for fpGUI toolkit (*bgrabitmappack4fpgui.lpk*)
1313- *TBGRANoGUIBitmap* when using the package independent of the graphic user interface (*bgrabitmappack4nogui.lpk*)
1414- *TBGRADefaultBitmap* otherwise
1515
1616### Direct pixel access
1717
1818The image is stored as BGRA 32-bit:
1919
20-<table style="border-collapse: collapse;">
21-
22-<tr>
23-
24-<td width="10%">
25-
26-</td>
27-
28-<td colspan="2" style="background: white;">
29-
3020*PBGRAPixel* = ^TBGRAPixel;
3121
32-</td>
33-
34-</tr>
35-
36-<tr>
37-
38-<td width="10%">
39-
40-</td>
41-
42-<td width="10%">
43-
44-</td>
45-
46-<td style="border: 1px solid #e0e0a0; background: #ffffe4;" colspan="1">
47-
4822Pointer for direct pixel access. Data is stored as a sequence of *TBGRAPixel*. See [[BGRABitmap tutorial 4]]
4923
50-</td>
51-
52-</tr>
53-
54-<tr style="height: 8px;">
55-
56-<td colspan="3">
57-
58-</td>
59-
60-</tr>
61-
62-<tr>
63-
64-<td width="10%">
65-
66-</td>
67-
68-<td colspan="2" style="background: #f0f0ff;">
69-
7024*TBGRAPixel* = **packed** **record** blue, green, red, alpha: byte; **end**;
7125
72-</td>
73-
74-</tr>
75-
76-<tr>
77-
78-<td width="10%">
79-
80-</td>
81-
82-<td width="10%" style="background: #f0f0ff;">
83-
84-</td>
85-
86-<td style="border: 1px solid #e0e0a0; background: #ffffe4;" colspan="1">
87-
8826Each pixel is a sequence of 4 bytes containing blue, green, red and alpha channel. Values range from 0 to 255, color is in sRGB colorspace. The alpha value of 0 is transparent and 255 is opaque
8927
90-</td>
91-
92-</tr>
93-
94-</table>
95-
9628You can either use *Data* property if you want to go through all pixels, or *ScanLine* property if you want to do something that depends on the line number. *Data* returns the first pixel in memory, so that you can read all the pixels from there by increasing the pointer (add 1 to *PBGRAPixel*). Otherwise, you can do a loop where *y* goes from 0 to *Height*-1, and for each line, retrieve with *ScanLine* the pointer of the beginning of the line. Then you can read all the pixels of the line from there by increasing the pointer.
9729
9830The following properties of *TBGRABitmap* allow to access the data directly:
9931
100-<table style="border-collapse: collapse;">
101-
102-<tr style="background: white;">
103-
104-<td colspan="3">
105-
10632*TBGRABitmap* = **class**(TBGRACustomBitmap)
10733
108-</td>
109-
110-</tr>
111-
112-<tr style="height: 8px;">
113-
114-<td colspan="3">
115-
116-</td>
117-
118-</tr>
119-
120-<tr>
121-
122-<td width="10%">
123-
124-</td>
125-
126-<td colspan="2" style="background: #f0f0ff;">
127-
12834**property** Width: integer **read**;
12935
130-</td>
131-
132-</tr>
133-
134-<tr>
135-
136-<td width="10%">
137-
138-</td>
139-
140-<td width="10%" style="background: #f0f0ff;">
141-
142-</td>
143-
144-<td style="border: 1px solid #e0e0a0; background: #ffffe4;">
145-
14636Width of the image in pixels
14737
148-</td>
149-
150-</tr>
151-
152-<tr style="height: 8px;">
153-
154-<td colspan="3">
155-
156-</td>
157-
158-</tr>
159-
160-<tr>
161-
162-<td width="10%">
163-
164-</td>
165-
166-<td colspan="2" style="background: white;">
167-
16838**property** Height: integer **read**;
16939
170-</td>
171-
172-</tr>
173-
174-<tr>
175-
176-<td width="10%">
177-
178-</td>
179-
180-<td width="10%" style="background: white;">
181-
182-</td>
183-
184-<td style="border: 1px solid #e0e0a0; background: #ffffe4;">
185-
18640Height of the image in pixels
18741
188-</td>
189-
190-</tr>
191-
192-<tr style="height: 8px;">
193-
194-<td colspan="3">
195-
196-</td>
197-
198-</tr>
199-
200-<tr>
201-
202-<td width="10%">
203-
204-</td>
205-
206-<td colspan="2" style="background: white;">
207-
20842**property** NbPixels: integer **read**;
20943
210-</td>
211-
212-</tr>
213-
214-<tr>
215-
216-<td width="10%">
217-
218-</td>
219-
220-<td width="10%" style="background: white;">
221-
222-</td>
223-
224-<td style="border: 1px solid #e0e0a0; background: #ffffe4;">
225-
22644Total number of pixels. It is always true that *NbPixels* = *Width* * *Height*
22745
228-</td>
229-
230-</tr>
231-
232-<tr style="height: 8px;">
233-
234-<td colspan="3">
235-
236-</td>
237-
238-</tr>
239-
240-<tr>
241-
242-<td width="10%">
243-
244-</td>
245-
246-<td colspan="2" style="background: #f0f0ff;">
247-
24846**property** ScanLine\[y: integer\]: PBGRAPixel **read**;
24947
250-</td>
251-
252-</tr>
253-
254-<tr>
255-
256-<td width="10%">
257-
258-</td>
259-
260-<td width="10%" style="background: #f0f0ff;">
261-
262-</td>
263-
264-<td style="border: 1px solid #e0e0a0; background: #ffffe4;">
265-
26648Returns the address of the left-most pixel of any line. The parameter y ranges from 0 to Height-1
26749
268-</td>
269-
270-</tr>
271-
272-<tr style="height: 8px;">
273-
274-<td colspan="3">
275-
276-</td>
277-
278-</tr>
279-
280-<tr>
281-
282-<td width="10%">
283-
284-</td>
285-
286-<td colspan="2" style="background: white;">
287-
28850**property** LineOrder: TRawImageLineOrder **read**;
28951
290-</td>
291-
292-</tr>
293-
294-<tr>
295-
296-<td width="10%">
297-
298-</td>
299-
300-<td width="10%" style="background: white;">
301-
302-</td>
303-
304-<td style="border: 1px solid #e0e0a0; background: #ffffe4;">
305-
30652Indicates the order in which lines are stored in memory. If it is equal to *riloTopToBottom*, the first line is the top line. If it is equal to *riloBottomToTop*, the first line is the bottom line. See [[BGRABitmap Miscellaneous types|miscellaneous types]]
30753
308-</td>
309-
310-</tr>
311-
312-<tr style="height: 8px;">
313-
314-<td colspan="3">
315-
316-</td>
317-
318-</tr>
319-
320-<tr>
321-
322-<td width="10%">
323-
324-</td>
325-
326-<td colspan="2" style="background: #f0f0ff;">
327-
32854**property** Data: PBGRAPixel **read**;
32955
330-</td>
331-
332-</tr>
333-
334-<tr>
335-
336-<td width="10%">
337-
338-</td>
339-
340-<td width="10%" style="background: #f0f0ff;">
341-
342-</td>
343-
344-<td style="border: 1px solid #e0e0a0; background: #ffffe4;">
345-
34656Provides a pointer to the first pixel in memory. Depending on the *LineOrder* property, this can be the top-left pixel or the bottom-left pixel. There is no padding between scanlines, so the start of the next line is at the address *Data* + *Width*. See [[BGRABitmap tutorial 4]]
34757
348-</td>
349-
350-</tr>
351-
352-<tr style="height: 8px;">
353-
354-<td colspan="3">
355-
356-</td>
357-
358-</tr>
359-
360-<tr>
361-
362-<td width="10%">
363-
364-</td>
365-
366-<td colspan="2" style="background: white;">
367-
36858**property** Caption: **string** **read** **write**;
36959
370-</td>
371-
372-</tr>
373-
374-<tr>
375-
376-<td width="10%">
377-
378-</td>
379-
380-<td width="10%" style="background: white;">
381-
382-</td>
383-
384-<td style="border: 1px solid #e0e0a0; background: #ffffe4;">
385-
38660Can contain a text to describe the image. It is not displayed. It is the name of the layer if this image is in a layered bitmap.
38761
388-</td>
389-
390-</tr>
391-
392-</table>
393-
39462### TBGRABitmap reference
39563
396-<table style="border-collapse: collapse; width: 100%">
397-
398-<tr style="background: white;">
399-
400-<td colspan="3">
401-
40264*TBGRABitmap* = **class**(TBGRACustomBitmap)
40365
404-</td>
405-
406-</tr>
407-
408-<tr style="background: white;">
409-
410-<td width="10%">
411-
412-</td>
413-
414-<td style="border: 1px solid #e0e0a0; background: #ffffe4;" colspan="2">
415-
41666This class is the base for all *TBGRABitmap* classes. It implements most function to the exception from implementations specific to the widgetset
41767
418-</td>
419-
420-</tr>
421-
422-<tr style="height: 8px;">
423-
424-<td colspan="3">
425-
426-</td>
427-
428-</tr>
429-
430-<tr>
431-
432-<td width="10%">
433-
434-</td>
435-
436-<td colspan="2" style="background: #f0f0ff;">
437-
43868**property** CanvasBGRA: TBGRACanvas **read**;
43969
440-</td>
441-
442-</tr>
443-
444-<tr>
445-
446-<td width="10%">
447-
448-</td>
449-
450-<td width="10%" style="background: #f0f0ff;">
451-
452-</td>
453-
454-<td style="border: 1px solid #e0e0a0; background: #ffffe4;">
455-
45670Provides a canvas with opacity and antialiasing
45771
458-</td>
459-
460-</tr>
461-
462-<tr style="height: 8px;">
463-
464-<td colspan="3">
465-
466-</td>
467-
468-</tr>
469-
470-<tr>
471-
472-<td width="10%">
473-
474-</td>
475-
476-<td colspan="2" style="background: white;">
477-
47872**property** Canvas2D: TBGRACanvas2D **read**;
47973
480-</td>
481-
482-</tr>
483-
484-<tr>
485-
486-<td width="10%">
487-
488-</td>
489-
490-<td width="10%" style="background: white;">
491-
492-</td>
493-
494-<td style="border: 1px solid #e0e0a0; background: #ffffe4;">
495-
49674Provides a canvas with 2d transformation and similar to HTML5.
49775
498-</td>
499-
500-</tr>
501-
502-<tr style="height: 8px;">
503-
504-<td colspan="3">
505-
506-</td>
507-
508-</tr>
509-
510-</table>
511-
51276For more properties, see parent class [[TBGRACustomBitmap and IBGRAScanner|TBGRACustomBitmap]]
51377
51478#### Reference counting
51579
516-<table style="border-collapse: collapse; width: 100%">
517-
518-<tr>
519-
520-<td width="10%">
521-
522-</td>
523-
524-<td colspan="2" style="background: white;">
525-
52680**function** NewReference: TBGRACustomBitmap;
52781
528-</td>
529-
530-</tr>
531-
532-<tr>
533-
534-<td width="10%">
535-
536-</td>
537-
538-<td width="10%" style="background: white;">
539-
540-</td>
541-
542-<td style="border: 1px solid #e0e0a0; background: #ffffe4;">
543-
54482Adds a reference (this reference count is not the same as the reference count of an interface, it changes only by explicit calls
54583
546-</td>
547-
548-</tr>
549-
550-<tr style="height: 8px;">
551-
552-<td colspan="3">
553-
554-</td>
555-
556-</tr>
557-
558-<tr>
559-
560-<td width="10%">
561-
562-</td>
563-
564-<td colspan="2" style="background: #f0f0ff;">
565-
56684**procedure** FreeReference;
56785
568-</td>
569-
570-</tr>
571-
572-<tr>
573-
574-<td width="10%">
575-
576-</td>
577-
578-<td width="10%" style="background: #f0f0ff;">
579-
580-</td>
581-
582-<td style="border: 1px solid #e0e0a0; background: #ffffe4;">
583-
58486Free a reference. When the resulting reference count gets to zero, the image is freed. The initial reference count is equal to 1
58587
586-</td>
587-
588-</tr>
589-
590-<tr style="height: 8px;">
591-
592-<td colspan="3">
593-
594-</td>
595-
596-</tr>
597-
598-<tr>
599-
600-<td width="10%">
601-
602-</td>
603-
604-<td colspan="2" style="background: white;">
605-
60688**function** GetUnique: TBGRACustomBitmap;
60789
608-</td>
609-
610-</tr>
611-
612-<tr>
613-
614-<td width="10%">
615-
616-</td>
617-
618-<td width="10%" style="background: white;">
619-
620-</td>
621-
622-<td style="border: 1px solid #e0e0a0; background: #ffffe4;">
623-
62490Returns an object with a reference count equal to 1. Duplicate this bitmap if necessary
62591
626-</td>
627-
628-</tr>
629-
630-<tr style="height: 8px;">
631-
632-<td colspan="3">
633-
634-</td>
635-
636-</tr>
637-
638-</table>
639-
64092#### Constructors
64193
642-<table style="border-collapse: collapse; width: 100%">
643-
644-<tr>
645-
646-<td width="10%">
647-
648-</td>
649-
650-<td colspan="2" style="background: white;">
651-
65294**constructor** Create(AWidth, AHeight: integer); **override**;
65395
654-</td>
655-
656-</tr>
657-
658-<tr>
659-
660-<td width="10%">
661-
662-</td>
663-
664-<td width="10%" style="background: white;">
665-
666-</td>
667-
668-<td style="border: 1px solid #e0e0a0; background: #ffffe4;">
669-
67096Creates a new bitmap, initialize properties and bitmap data
67197
672-</td>
673-
674-</tr>
675-
676-<tr style="height: 8px;">
677-
678-<td colspan="3">
679-
680-</td>
681-
682-</tr>
683-
684-<tr>
685-
686-<td width="10%">
687-
688-</td>
689-
690-<td colspan="2" style="background: #f0f0ff;">
691-
69298**procedure** SetSize(AWidth, AHeight: integer); **override**;
69399
694-</td>
695-
696-</tr>
697-
698-<tr>
699-
700-<td width="10%">
701-
702-</td>
703-
704-<td width="10%" style="background: #f0f0ff;">
705-
706-</td>
707-
708-<td style="border: 1px solid #e0e0a0; background: #ffffe4;">
709-
710100Can only be called with an existing instance of *TBGRABitmap*. Sets the dimensions of an existing *TBGRABitmap* instance.
711101
712-</td>
713-
714-</tr>
715-
716-<tr style="height: 8px;">
717-
718-<td colspan="3">
719-
720-</td>
721-
722-</tr>
723-
724-<tr>
725-
726-<td width="10%">
727-
728-</td>
729-
730-<td colspan="2" style="background: white;">
731-
732102**constructor** Create; **override**;
733103
734-</td>
735-
736-</tr>
737-
738-<tr>
739-
740-<td width="10%">
741-
742-</td>
743-
744-<td width="10%" style="background: white;">
745-
746-</td>
747-
748-<td style="border: 1px solid #e0e0a0; background: #ffffe4;">
749-
750104Creates an image of width and height equal to zero. In this case, *Data* = **nil**
751105
752-</td>
753-
754-</tr>
755-
756-<tr style="height: 8px;">
757-
758-<td colspan="3">
759-
760-</td>
761-
762-</tr>
763-
764-<tr>
765-
766-<td width="10%">
767-
768-</td>
769-
770-<td colspan="2" style="background: #f0f0ff;">
771-
772106**constructor** Create(AFPImage: TFPCustomImage); **override**;
773107
774-</td>
775-
776-</tr>
777-
778-<tr>
779-
780-<td width="10%">
781-
782-</td>
783-
784-<td width="10%" style="background: #f0f0ff;">
785-
786-</td>
787-
788-<td style="border: 1px solid #e0e0a0; background: #ffffe4;">
789-
790108Creates an image by copying the content of a *TFPCustomImage*
791109
792-</td>
793-
794-</tr>
795-
796-<tr style="height: 8px;">
797-
798-<td colspan="3">
799-
800-</td>
801-
802-</tr>
803-
804-<tr>
805-
806-<td width="10%">
807-
808-</td>
809-
810-<td colspan="2" style="background: white;">
811-
812110**constructor** Create(ABitmap: TBitmap); **override**;
813111
814-</td>
815-
816-</tr>
817-
818-<tr>
819-
820-<td width="10%">
821-
822-</td>
823-
824-<td width="10%" style="background: white;">
825-
826-</td>
827-
828-<td style="border: 1px solid #e0e0a0; background: #ffffe4;">
829-
830112Creates an image by copying the content of a *TBitmap*
831113
832-</td>
833-
834-</tr>
835-
836-<tr style="height: 8px;">
837-
838-<td colspan="3">
839-
840-</td>
841-
842-</tr>
843-
844-<tr>
845-
846-<td width="10%">
847-
848-</td>
849-
850-<td colspan="2" style="background: #f0f0ff;">
851-
852114**constructor** Create(AWidth, AHeight: integer; Color: TColor); **override**;
853115
854-</td>
855-
856-</tr>
857-
858-<tr>
859-
860-<td width="10%">
861-
862-</td>
863-
864-<td width="10%" style="background: #f0f0ff;">
865-
866-</td>
867-
868-<td style="border: 1px solid #e0e0a0; background: #ffffe4;">
869-
870116Creates an image of dimensions *AWidth* and *AHeight* and fills it with the opaque color *Color*
871117
872-</td>
873-
874-</tr>
875-
876-<tr style="height: 8px;">
877-
878-<td colspan="3">
879-
880-</td>
881-
882-</tr>
883-
884-<tr>
885-
886-<td width="10%">
887-
888-</td>
889-
890-<td colspan="2" style="background: white;">
891-
892118**constructor** Create(AWidth, AHeight: integer; Color: TBGRAPixel); **override**;
893119
894-</td>
895-
896-</tr>
897-
898-<tr>
899-
900-<td width="10%">
901-
902-</td>
903-
904-<td width="10%" style="background: white;">
905-
906-</td>
907-
908-<td style="border: 1px solid #e0e0a0; background: #ffffe4;">
909-
910120Creates an image of dimensions *AWidth* and *AHeight* and fills it with *Color*
911121
912-</td>
913-
914-</tr>
915-
916-<tr style="height: 8px;">
917-
918-<td colspan="3">
919-
920-</td>
921-
922-</tr>
923-
924-<tr>
925-
926-<td width="10%">
927-
928-</td>
929-
930-<td colspan="2" style="background: #f0f0ff;">
931-
932122**constructor** Create(AFilename: **string**); **override**;
933123
934-</td>
935-
936-</tr>
937-
938-<tr>
939-
940-<td width="10%">
941-
942-</td>
943-
944-<td width="10%" style="background: #f0f0ff;">
945-
946-</td>
947-
948-<td style="border: 1px solid #e0e0a0; background: #ffffe4;">
949-
950124Creates an image by loading its content from the file *AFilename*. The encoding of the string is the default one for the operating system. It is recommended to use the next constructor and UTF8 encoding
951125
952-</td>
953-
954-</tr>
955-
956-<tr style="height: 8px;">
957-
958-<td colspan="3">
959-
960-</td>
961-
962-</tr>
963-
964-<tr>
965-
966-<td width="10%">
967-
968-</td>
969-
970-<td colspan="2" style="background: white;">
971-
972126**constructor** Create(AFilename: **string**; AIsUtf8: boolean); **override**;
973127
974-</td>
975-
976-</tr>
977-
978-<tr>
979-
980-<td width="10%">
981-
982-</td>
983-
984-<td width="10%" style="background: white;">
985-
986-</td>
987-
988-<td style="border: 1px solid #e0e0a0; background: #ffffe4;">
989-
990128Creates an image by loading its content from the file *AFilename*. The boolean *AIsUtf8Filename* specifies if UTF8 encoding is assumed for the filename
991129
992-</td>
993-
994-</tr>
995-
996-<tr style="height: 8px;">
997-
998-<td colspan="3">
999-
1000-</td>
1001-
1002-</tr>
1003-
1004-<tr>
1005-
1006-<td width="10%">
1007-
1008-</td>
1009-
1010-<td colspan="2" style="background: #f0f0ff;">
1011-
1012130**constructor** Create(AStream: TStream); **override**;
1013131
1014-</td>
1015-
1016-</tr>
1017-
1018-<tr>
1019-
1020-<td width="10%">
1021-
1022-</td>
1023-
1024-<td width="10%" style="background: #f0f0ff;">
1025-
1026-</td>
1027-
1028-<td style="border: 1px solid #e0e0a0; background: #ffffe4;">
1029-
1030132Creates an image by loading its content from the stream *AStream*
1031133
1032-</td>
1033-
1034-</tr>
1035-
1036-<tr style="height: 8px;">
1037-
1038-<td colspan="3">
1039-
1040-</td>
1041-
1042-</tr>
1043-
1044-<tr>
1045-
1046-<td width="10%">
1047-
1048-</td>
1049-
1050-<td colspan="2" style="background: white;">
1051-
1052134**destructor** Destroy; **override**;
1053135
1054-</td>
1055-
1056-</tr>
1057-
1058-<tr>
1059-
1060-<td width="10%">
1061-
1062-</td>
1063-
1064-<td width="10%" style="background: white;">
1065-
1066-</td>
1067-
1068-<td style="border: 1px solid #e0e0a0; background: #ffffe4;">
1069-
1070136Free the object and all its resources
1071137
1072-</td>
1073-
1074-</tr>
1075-
1076-<tr style="height: 8px;">
1077-
1078-<td colspan="3">
1079-
1080-</td>
1081-
1082-</tr>
1083-
1084-<tr>
1085-
1086-<td width="10%">
1087-
1088-</td>
1089-
1090-<td colspan="2" style="background: #f0f0ff;">
1091-
1092138**function** NewBitmap(AWidth, AHeight: integer): TBGRACustomBitmap; **override**;
1093139
1094-</td>
1095-
1096-</tr>
1097-
1098-<tr>
1099-
1100-<td width="10%">
1101-
1102-</td>
1103-
1104-<td width="10%" style="background: #f0f0ff;">
1105-
1106-</td>
1107-
1108-<td style="border: 1px solid #e0e0a0; background: #ffffe4;">
1109-
1110140Can only be called from an existing instance of *TBGRABitmap*. Creates a new instance with dimensions *AWidth* and *AHeight*, containing transparent pixels.
1111141
1112-</td>
1113-
1114-</tr>
1115-
1116-<tr style="height: 8px;">
1117-
1118-<td colspan="3">
1119-
1120-</td>
1121-
1122-</tr>
1123-
1124-<tr>
1125-
1126-<td width="10%">
1127-
1128-</td>
1129-
1130-<td colspan="2" style="background: white;">
1131-
1132142**function** NewBitmap(AWidth, AHeight: integer; Color: TBGRAPixel): TBGRACustomBitmap; **override**;
1133143
1134-</td>
1135-
1136-</tr>
1137-
1138-<tr>
1139-
1140-<td width="10%">
1141-
1142-</td>
1143-
1144-<td width="10%" style="background: white;">
1145-
1146-</td>
1147-
1148-<td style="border: 1px solid #e0e0a0; background: #ffffe4;">
1149-
1150144Can only be called from an existing instance of *TBGRABitmap*. Creates a new instance with dimensions *AWidth* and *AHeight*, and fills it with Color
1151145
1152-</td>
1153-
1154-</tr>
1155-
1156-<tr style="height: 8px;">
1157-
1158-<td colspan="3">
1159-
1160-</td>
1161-
1162-</tr>
1163-
1164-<tr>
1165-
1166-<td width="10%">
1167-
1168-</td>
1169-
1170-<td colspan="2" style="background: #f0f0ff;">
1171-
1172146**function** NewBitmap(Filename: **string**): TBGRACustomBitmap; **override**;
1173147
1174-</td>
1175-
1176-</tr>
1177-
1178-<tr>
1179-
1180-<td width="10%">
1181-
1182-</td>
1183-
1184-<td width="10%" style="background: #f0f0ff;">
1185-
1186-</td>
1187-
1188-<td style="border: 1px solid #e0e0a0; background: #ffffe4;">
1189-
1190148Can only be called from an existing instance of *TBGRABitmap*. Creates a new instance with by loading its content from the file *Filename*. The encoding of the string is the default one for the operating system
1191149
1192-</td>
1193-
1194-</tr>
1195-
1196-<tr style="height: 8px;">
1197-
1198-<td colspan="3">
1199-
1200-</td>
1201-
1202-</tr>
1203-
1204-<tr>
1205-
1206-<td width="10%">
1207-
1208-</td>
1209-
1210-<td colspan="2" style="background: white;">
1211-
1212150**function** NewBitmap(Filename: **string**; AIsUtf8: boolean): TBGRACustomBitmap; **override**;
1213151
1214-</td>
1215-
1216-</tr>
1217-
1218-<tr>
1219-
1220-<td width="10%">
1221-
1222-</td>
1223-
1224-<td width="10%" style="background: white;">
1225-
1226-</td>
1227-
1228-<td style="border: 1px solid #e0e0a0; background: #ffffe4;">
1229-
1230152Can only be called from an existing instance of *TBGRABitmap*. Creates a new instance with by loading its content from the file *Filename*
1231153
1232-</td>
1233-
1234-</tr>
1235-
1236-<tr style="height: 8px;">
1237-
1238-<td colspan="3">
1239-
1240-</td>
1241-
1242-</tr>
1243-
1244-<tr>
1245-
1246-<td width="10%">
1247-
1248-</td>
1249-
1250-<td colspan="2" style="background: #f0f0ff;">
1251-
1252154**procedure** Assign(Source: TPersistent); **override**;
1253155
1254-</td>
1255-
1256-</tr>
1257-
1258-<tr>
1259-
1260-<td width="10%">
1261-
1262-</td>
1263-
1264-<td width="10%" style="background: #f0f0ff;">
1265-
1266-</td>
1267-
1268-<td style="border: 1px solid #e0e0a0; background: #ffffe4;">
1269-
1270156Assign the content of the specified *Source*. It can be a *TBGRACustomBitmap* or a *TFPCustomImage*
1271157
1272-</td>
1273-
1274-</tr>
1275-
1276-<tr style="height: 8px;">
1277-
1278-<td colspan="3">
1279-
1280-</td>
1281-
1282-</tr>
1283-
1284-<tr>
1285-
1286-<td width="10%">
1287-
1288-</td>
1289-
1290-<td colspan="2" style="background: white;">
1291-
1292158**procedure** Serialize(AStream: TStream); **override**;
1293159
1294-</td>
1295-
1296-</tr>
1297-
1298-<tr>
1299-
1300-<td width="10%">
1301-
1302-</td>
1303-
1304-<td width="10%" style="background: white;">
1305-
1306-</td>
1307-
1308-<td style="border: 1px solid #e0e0a0; background: #ffffe4;">
1309-
1310160Stores the image in the stream without compression nor header
1311161
1312-</td>
1313-
1314-</tr>
1315-
1316-<tr style="height: 8px;">
1317-
1318-<td colspan="3">
1319-
1320-</td>
1321-
1322-</tr>
1323-
1324-<tr>
1325-
1326-<td width="10%">
1327-
1328-</td>
1329-
1330-<td colspan="2" style="background: #f0f0ff;">
1331-
1332162**procedure** Deserialize(AStream: TStream); **override**;
1333163
1334-</td>
1335-
1336-</tr>
1337-
1338-<tr>
1339-
1340-<td width="10%">
1341-
1342-</td>
1343-
1344-<td width="10%" style="background: #f0f0ff;">
1345-
1346-</td>
1347-
1348-<td style="border: 1px solid #e0e0a0; background: #ffffe4;">
1349-
1350164Reads the image in a stream that was previously serialized
1351165
1352-</td>
1353-
1354-</tr>
1355-
1356-<tr style="height: 8px;">
1357-
1358-<td colspan="3">
1359-
1360-</td>
1361-
1362-</tr>
1363-
1364-<tr>
1365-
1366-<td width="10%">
1367-
1368-</td>
1369-
1370-<td colspan="2" style="background: white;">
1371-
1372166**class** **procedure** SerializeEmpty(AStream: TStream);
1373167
1374-</td>
1375-
1376-</tr>
1377-
1378-<tr>
1379-
1380-<td width="10%">
1381-
1382-</td>
1383-
1384-<td width="10%" style="background: white;">
1385-
1386-</td>
1387-
1388-<td style="border: 1px solid #e0e0a0; background: #ffffe4;">
1389-
1390168Stores an empty image (of size zero)
1391169
1392-</td>
1393-
1394-</tr>
1395-
1396-<tr style="height: 8px;">
1397-
1398-<td colspan="3">
1399-
1400-</td>
1401-
1402-</tr>
1403-
1404-</table>
1405-
1406170Example:
1407171
1408172``` pascal
1409173var bmp1, bmp2: TBGRABitmap;
1410174begin
1411175 bmp1 := TBGRABitmap.Create(100,100);
1412176 bmp2 := bmp1.NewBitmap(100,100) as TBGRABitmap;
1413177 ...
1414178end;
1415179```
1416180
1417181See tutorial 2 on [[BGRABitmap tutorial 2|how to load and display an image]].
1418182
1419183See reference on [[TBGRACustomBitmap and IBGRAScanner|loading and saving files]]
1420184
1421185#### Pixel functions
1422186
1423-<table style="border-collapse: collapse; width: 100%">
1424-
1425-<tr>
1426-
1427-<td width="10%">
1428-
1429-</td>
1430-
1431-<td colspan="2" style="background: white;">
1432-
1433187**function** PtInClipRect(x, y: int32or64): boolean; **inline**;
1434188
1435-</td>
1436-
1437-</tr>
1438-
1439-<tr>
1440-
1441-<td width="10%">
1442-
1443-</td>
1444-
1445-<td width="10%" style="background: white;">
1446-
1447-</td>
1448-
1449-<td style="border: 1px solid #e0e0a0; background: #ffffe4;">
1450-
1451189Checks if the specified point is in the clipping rectangle *ClipRect*
1452190
1453-</td>
1454-
1455-</tr>
1456-
1457-<tr style="height: 8px;">
1458-
1459-<td colspan="3">
1460-
1461-</td>
1462-
1463-</tr>
1464-
1465-<tr>
1466-
1467-<td width="10%">
1468-
1469-</td>
1470-
1471-<td colspan="2" style="background: #f0f0ff;">
1472-
1473191**procedure** SetPixel(x, y: int32or64; c: TColor); **override**;
1474192
1475-</td>
1476-
1477-</tr>
1478-
1479-<tr>
1480-
1481-<td width="10%">
1482-
1483-</td>
1484-
1485-<td width="10%" style="background: #f0f0ff;">
1486-
1487-</td>
1488-
1489-<td style="border: 1px solid #e0e0a0; background: #ffffe4;">
1490-
1491193Sets the pixel by replacing the content at (*x*,*y*) with the specified color. Alpha value is set to 255 (opaque)
1492194
1493-</td>
1494-
1495-</tr>
1496-
1497-<tr style="height: 8px;">
1498-
1499-<td colspan="3">
1500-
1501-</td>
1502-
1503-</tr>
1504-
1505-<tr>
1506-
1507-<td width="10%">
1508-
1509-</td>
1510-
1511-<td colspan="2" style="background: white;">
1512-
1513195**procedure** SetPixel(x, y: int32or64; c: TBGRAPixel); **override**;
1514196
1515-</td>
1516-
1517-</tr>
1518-
1519-<tr>
1520-
1521-<td width="10%">
1522-
1523-</td>
1524-
1525-<td width="10%" style="background: white;">
1526-
1527-</td>
1528-
1529-<td style="border: 1px solid #e0e0a0; background: #ffffe4;">
1530-
1531197Sets the pixel at (*x*,*y*) with the specified content
1532198
1533-</td>
1534-
1535-</tr>
1536-
1537-<tr style="height: 8px;">
1538-
1539-<td colspan="3">
1540-
1541-</td>
1542-
1543-</tr>
1544-
1545-<tr>
1546-
1547-<td width="10%">
1548-
1549-</td>
1550-
1551-<td colspan="2" style="background: #f0f0ff;">
1552-
1553199**procedure** XorPixel(x, y: int32or64; c: TBGRAPixel); **override**;
1554200
1555-</td>
1556-
1557-</tr>
1558-
1559-<tr>
1560-
1561-<td width="10%">
1562-
1563-</td>
1564-
1565-<td width="10%" style="background: #f0f0ff;">
1566-
1567-</td>
1568-
1569-<td style="border: 1px solid #e0e0a0; background: #ffffe4;">
1570-
1571201Applies a logical **xor** to the content of the pixel with the specified value. This includes the alpha channel, so if you want to preserve the opacity, provide a color *c* with alpha channel equal to zero
1572202
1573-</td>
1574-
1575-</tr>
1576-
1577-<tr style="height: 8px;">
1578-
1579-<td colspan="3">
1580-
1581-</td>
1582-
1583-</tr>
1584-
1585-<tr>
1586-
1587-<td width="10%">
1588-
1589-</td>
1590-
1591-<td colspan="2" style="background: white;">
1592-
1593203**procedure** DrawPixel(x, y: int32or64; c: TBGRAPixel); **override**;
1594204
1595-</td>
1596-
1597-</tr>
1598-
1599-<tr>
1600-
1601-<td width="10%">
1602-
1603-</td>
1604-
1605-<td width="10%" style="background: white;">
1606-
1607-</td>
1608-
1609-<td style="border: 1px solid #e0e0a0; background: #ffffe4;">
1610-
1611205Draws a pixel with gamma correction at (*x*,*y*). Pixel is supplied in sRGB colorspace
1612206
1613-</td>
1614-
1615-</tr>
1616-
1617-<tr style="height: 8px;">
1618-
1619-<td colspan="3">
1620-
1621-</td>
1622-
1623-</tr>
1624-
1625-<tr>
1626-
1627-<td width="10%">
1628-
1629-</td>
1630-
1631-<td colspan="2" style="background: #f0f0ff;">
1632-
1633207**procedure** DrawPixel(x, y: int32or64; c: TBGRAPixel; ADrawMode: TDrawMode); **overload**;
1634208
1635-</td>
1636-
1637-</tr>
1638-
1639-<tr>
1640-
1641-<td width="10%">
1642-
1643-</td>
1644-
1645-<td width="10%" style="background: #f0f0ff;">
1646-
1647-</td>
1648-
1649-<td style="border: 1px solid #e0e0a0; background: #ffffe4;">
1650-
1651209Draws a pixel with the specified *ADrawMode* at (*x*,*y*). Pixel is supplied in sRGB colorspace. Gamma correction may be applied depending on the draw mode
1652210
1653-</td>
1654-
1655-</tr>
1656-
1657-<tr style="height: 8px;">
1658-
1659-<td colspan="3">
1660-
1661-</td>
1662-
1663-</tr>
1664-
1665-<tr>
1666-
1667-<td width="10%">
1668-
1669-</td>
1670-
1671-<td colspan="2" style="background: white;">
1672-
1673211**procedure** DrawPixel(x, y: int32or64; ec: TExpandedPixel); **override**;
1674212
1675-</td>
1676-
1677-</tr>
1678-
1679-<tr>
1680-
1681-<td width="10%">
1682-
1683-</td>
1684-
1685-<td width="10%" style="background: white;">
1686-
1687-</td>
1688-
1689-<td style="border: 1px solid #e0e0a0; background: #ffffe4;">
1690-
1691213Draws a pixel with gamma correction at (*x*,*y*). Pixel is supplied in gamma expanded colorspace
1692214
1693-</td>
1694-
1695-</tr>
1696-
1697-<tr style="height: 8px;">
1698-
1699-<td colspan="3">
1700-
1701-</td>
1702-
1703-</tr>
1704-
1705-<tr>
1706-
1707-<td width="10%">
1708-
1709-</td>
1710-
1711-<td colspan="2" style="background: #f0f0ff;">
1712-
1713215**procedure** FastBlendPixel(x, y: int32or64; c: TBGRAPixel); **override**;
1714216
1715-</td>
1716-
1717-</tr>
1718-
1719-<tr>
1720-
1721-<td width="10%">
1722-
1723-</td>
1724-
1725-<td width="10%" style="background: #f0f0ff;">
1726-
1727-</td>
1728-
1729-<td style="border: 1px solid #e0e0a0; background: #ffffe4;">
1730-
1731217Draws a pixel without gamma correction at (*x*,*y*). Pixel is supplied in sRGB colorspace
1732218
1733-</td>
1734-
1735-</tr>
1736-
1737-<tr style="height: 8px;">
1738-
1739-<td colspan="3">
1740-
1741-</td>
1742-
1743-</tr>
1744-
1745-<tr>
1746-
1747-<td width="10%">
1748-
1749-</td>
1750-
1751-<td colspan="2" style="background: white;">
1752-
1753219**procedure** ErasePixel(x, y: int32or64; alpha: byte); **override**;
1754220
1755-</td>
1756-
1757-</tr>
1758-
1759-<tr>
1760-
1761-<td width="10%">
1762-
1763-</td>
1764-
1765-<td width="10%" style="background: white;">
1766-
1767-</td>
1768-
1769-<td style="border: 1px solid #e0e0a0; background: #ffffe4;">
1770-
1771221Erase the content of the pixel by reducing the value of the alpha channel. *alpha* specifies how much to decrease. If the resulting alpha reaches zero, the content is replaced by *BGRAPixelTransparent*
1772222
1773-</td>
1774-
1775-</tr>
1776-
1777-<tr style="height: 8px;">
1778-
1779-<td colspan="3">
1780-
1781-</td>
1782-
1783-</tr>
1784-
1785-<tr>
1786-
1787-<td width="10%">
1788-
1789-</td>
1790-
1791-<td colspan="2" style="background: #f0f0ff;">
1792-
1793223**procedure** AlphaPixel(x, y: int32or64; alpha: byte); **override**;
1794224
1795-</td>
1796-
1797-</tr>
1798-
1799-<tr>
1800-
1801-<td width="10%">
1802-
1803-</td>
1804-
1805-<td width="10%" style="background: #f0f0ff;">
1806-
1807-</td>
1808-
1809-<td style="border: 1px solid #e0e0a0; background: #ffffe4;">
1810-
1811225Sets the alpha value at (*x*,*y*). If *alpha* = 0, the pixel is replaced by *BGRAPixelTransparent*
1812226
1813-</td>
1814-
1815-</tr>
1816-
1817-<tr style="height: 8px;">
1818-
1819-<td colspan="3">
1820-
1821-</td>
1822-
1823-</tr>
1824-
1825-<tr>
1826-
1827-<td width="10%">
1828-
1829-</td>
1830-
1831-<td colspan="2" style="background: white;">
1832-
1833227**function** GetPixel(x, y: int32or64): TBGRAPixel; **override**;
1834228
1835-</td>
1836-
1837-</tr>
1838-
1839-<tr>
1840-
1841-<td width="10%">
1842-
1843-</td>
1844-
1845-<td width="10%" style="background: white;">
1846-
1847-</td>
1848-
1849-<td style="border: 1px solid #e0e0a0; background: #ffffe4;">
1850-
1851229Returns the content of the specified pixel. If it is out of the bounds of the picture, the result is *BGRAPixelTransparent*
1852230
1853-</td>
1854-
1855-</tr>
1856-
1857-<tr style="height: 8px;">
1858-
1859-<td colspan="3">
1860-
1861-</td>
1862-
1863-</tr>
1864-
1865-<tr>
1866-
1867-<td width="10%">
1868-
1869-</td>
1870-
1871-<td colspan="2" style="background: #f0f0ff;">
1872-
1873231**function** GetPixel(x, y: single; AResampleFilter: TResampleFilter = rfLinear; smoothBorder: boolean = true): TBGRAPixel; **override**;
1874232
1875-</td>
1876-
1877-</tr>
1878-
1879-<tr>
1880-
1881-<td width="10%">
1882-
1883-</td>
1884-
1885-<td width="10%" style="background: #f0f0ff;">
1886-
1887-</td>
1888-
1889-<td style="border: 1px solid #e0e0a0; background: #ffffe4;">
1890-
1891233Computes the value of the pixel at a floating point coordiante by interpolating the values of the pixels around it.\
1892234There is a one pixel wide margin around the pixel where the pixels are still considered inside. If *smoothBorder* is set to true, pixel fade to transparent.\
1893235If it is more out of the bounds, the result is *BGRAPixelTransparent*.\
1894236*AResampleFilter* specifies how pixels must be interpolated. Accepted values are *rfBox*, *rfLinear*, *rfHalfCosine* and *rfCosine*
1895237
1896-</td>
1897-
1898-</tr>
1899-
1900-<tr style="height: 8px;">
1901-
1902-<td colspan="3">
1903-
1904-</td>
1905-
1906-</tr>
1907-
1908-<tr>
1909-
1910-<td width="10%">
1911-
1912-</td>
1913-
1914-<td colspan="2" style="background: white;">
1915-
1916238**function** GetPixel256(x, y, fracX256,fracY256: int32or64; AResampleFilter: TResampleFilter = rfLinear; smoothBorder: boolean = true): TBGRAPixel; **override**;
1917239
1918-</td>
1919-
1920-</tr>
1921-
1922-<tr>
1923-
1924-<td width="10%">
1925-
1926-</td>
1927-
1928-<td width="10%" style="background: white;">
1929-
1930-</td>
1931-
1932-<td style="border: 1px solid #e0e0a0; background: #ffffe4;">
1933-
1934240Similar to previous *GetPixel* function, but the fractional part of the coordinate is supplied with a number from 0 to 255. The actual coordinate is (*x* + *fracX256*/256, *y* + *fracY256*/256)
1935241
1936-</td>
1937-
1938-</tr>
1939-
1940-<tr style="height: 8px;">
1941-
1942-<td colspan="3">
1943-
1944-</td>
1945-
1946-</tr>
1947-
1948-<tr>
1949-
1950-<td width="10%">
1951-
1952-</td>
1953-
1954-<td colspan="2" style="background: #f0f0ff;">
1955-
1956242**function** GetPixelCycle(x, y: single; AResampleFilter: TResampleFilter = rfLinear): TBGRAPixel; **override**;
1957243
1958-</td>
1959-
1960-</tr>
1961-
1962-<tr>
1963-
1964-<td width="10%">
1965-
1966-</td>
1967-
1968-<td width="10%" style="background: #f0f0ff;">
1969-
1970-</td>
1971-
1972-<td style="border: 1px solid #e0e0a0; background: #ffffe4;">
1973-
1974244Computes the value of the pixel at a floating point coordiante by interpolating the values of the pixels around it. If the pixel is out of bounds, the image is repeated.\
1975245*AResampleFilter* specifies how pixels must be interpolated. Accepted values are *rfBox*, *rfLinear*, *rfHalfCosine* and *rfCosine*
1976246
1977-</td>
1978-
1979-</tr>
1980-
1981-<tr style="height: 8px;">
1982-
1983-<td colspan="3">
1984-
1985-</td>
1986-
1987-</tr>
1988-
1989-<tr>
1990-
1991-<td width="10%">
1992-
1993-</td>
1994-
1995-<td colspan="2" style="background: white;">
1996-
1997247**function** GetPixelCycle256(x, y, fracX256,fracY256: int32or64; AResampleFilter: TResampleFilter = rfLinear): TBGRAPixel; **override**;
1998248
1999-</td>
2000-
2001-</tr>
2002-
2003-<tr>
2004-
2005-<td width="10%">
2006-
2007-</td>
2008-
2009-<td width="10%" style="background: white;">
2010-
2011-</td>
2012-
2013-<td style="border: 1px solid #e0e0a0; background: #ffffe4;">
2014-
2015249Similar to previous *GetPixel* function, but the fractional part of the coordinate is supplied with a number from 0 to 255. The actual coordinate is (*x* + *fracX256*/256, *y* + *fracY256*/256)
2016250
2017-</td>
2018-
2019-</tr>
2020-
2021-<tr style="height: 8px;">
2022-
2023-<td colspan="3">
2024-
2025-</td>
2026-
2027-</tr>
2028-
2029-<tr>
2030-
2031-<td width="10%">
2032-
2033-</td>
2034-
2035-<td colspan="2" style="background: #f0f0ff;">
2036-
2037251**function** GetPixelCycle(x, y: single; AResampleFilter: TResampleFilter; repeatX: boolean; repeatY: boolean): TBGRAPixel; **override**;
2038252
2039-</td>
2040-
2041-</tr>
2042-
2043-<tr>
2044-
2045-<td width="10%">
2046-
2047-</td>
2048-
2049-<td width="10%" style="background: #f0f0ff;">
2050-
2051-</td>
2052-
2053-<td style="border: 1px solid #e0e0a0; background: #ffffe4;">
2054-
2055253Computes the value of the pixel at a floating point coordiante by interpolating the values of the pixels around it. *repeatX* and *repeatY* specifies if the image is to be repeated or not.\
2056254*AResampleFilter* specifies how pixels must be interpolated. Accepted values are *rfBox*, *rfLinear*, *rfHalfCosine* and *rfCosine*
2057255
2058-</td>
2059-
2060-</tr>
2061-
2062-<tr style="height: 8px;">
2063-
2064-<td colspan="3">
2065-
2066-</td>
2067-
2068-</tr>
2069-
2070-<tr>
2071-
2072-<td width="10%">
2073-
2074-</td>
2075-
2076-<td colspan="2" style="background: white;">
2077-
2078256**function** GetPixelCycle256(x, y, fracX256,fracY256: int32or64; AResampleFilter: TResampleFilter; repeatX: boolean; repeatY: boolean): TBGRAPixel; **override**;
2079257
2080-</td>
2081-
2082-</tr>
2083-
2084-<tr>
2085-
2086-<td width="10%">
2087-
2088-</td>
2089-
2090-<td width="10%" style="background: white;">
2091-
2092-</td>
2093-
2094-<td style="border: 1px solid #e0e0a0; background: #ffffe4;">
2095-
2096258Similar to previous *GetPixel* function, but the fractional part of the coordinate is supplied with a number from 0 to 255. The actual coordinate is (*x* + *fracX256*/256, *y* + *fracY256*/256)
2097259
2098-</td>
2099-
2100-</tr>
2101-
2102-<tr style="height: 8px;">
2103-
2104-<td colspan="3">
2105-
2106-</td>
2107-
2108-</tr>
2109-
2110-</table>
2111-
2112260#### Drawing lines and polylines (integer coordinates)
2113261
2114262These functions do not take into account current pen style/cap/join. See [[BGRABitmap tutorial 13|coordinate system]].
2115263
2116-<table style="border-collapse: collapse; width: 100%">
2117-
2118-<tr>
2119-
2120-<td width="10%">
2121-
2122-</td>
2123-
2124-<td colspan="2" style="background: white;">
2125-
2126264**procedure** SetHorizLine(x, y, x2: int32or64; c: TBGRAPixel); **override**;
2127265
2128-</td>
2129-
2130-</tr>
2131-
2132-<tr>
2133-
2134-<td width="10%">
2135-
2136-</td>
2137-
2138-<td width="10%" style="background: white;">
2139-
2140-</td>
2141-
2142-<td style="border: 1px solid #e0e0a0; background: #ffffe4;">
2143-
2144266Replaces the content of the pixels at line *y* and at columns *x* to *x2* included, using specified color
2145267
2146-</td>
2147-
2148-</tr>
2149-
2150-<tr style="height: 8px;">
2151-
2152-<td colspan="3">
2153-
2154-</td>
2155-
2156-</tr>
2157-
2158-<tr>
2159-
2160-<td width="10%">
2161-
2162-</td>
2163-
2164-<td colspan="2" style="background: #f0f0ff;">
2165-
2166268**procedure** XorHorizLine(x, y, x2: int32or64; c: TBGRAPixel); **override**;
2167269
2168-</td>
2169-
2170-</tr>
2171-
2172-<tr>
2173-
2174-<td width="10%">
2175-
2176-</td>
2177-
2178-<td width="10%" style="background: #f0f0ff;">
2179-
2180-</td>
2181-
2182-<td style="border: 1px solid #e0e0a0; background: #ffffe4;">
2183-
2184270Applies xor to the pixels at line *y* and at columns *x* to *x2* included, using specified color. This includes the alpha channel, so if you want to preserve the opacity, provide a color *c* with alpha channel equal to zero
2185271
2186-</td>
2187-
2188-</tr>
2189-
2190-<tr style="height: 8px;">
2191-
2192-<td colspan="3">
2193-
2194-</td>
2195-
2196-</tr>
2197-
2198-<tr>
2199-
2200-<td width="10%">
2201-
2202-</td>
2203-
2204-<td colspan="2" style="background: white;">
2205-
2206272**procedure** DrawHorizLine(x, y, x2: int32or64; c: TBGRAPixel); **override**;
2207273
2208-</td>
2209-
2210-</tr>
2211-
2212-<tr>
2213-
2214-<td width="10%">
2215-
2216-</td>
2217-
2218-<td width="10%" style="background: white;">
2219-
2220-</td>
2221-
2222-<td style="border: 1px solid #e0e0a0; background: #ffffe4;">
2223-
2224274Draws an horizontal line with gamma correction at line *y* and at columns *x* to *x2* included, using specified color
2225275
2226-</td>
2227-
2228-</tr>
2229-
2230-<tr style="height: 8px;">
2231-
2232-<td colspan="3">
2233-
2234-</td>
2235-
2236-</tr>
2237-
2238-<tr>
2239-
2240-<td width="10%">
2241-
2242-</td>
2243-
2244-<td colspan="2" style="background: #f0f0ff;">
2245-
2246276**procedure** DrawHorizLine(x, y, x2: int32or64; ec: TExpandedPixel); **override**;
2247277
2248-</td>
2249-
2250-</tr>
2251-
2252-<tr>
2253-
2254-<td width="10%">
2255-
2256-</td>
2257-
2258-<td width="10%" style="background: #f0f0ff;">
2259-
2260-</td>
2261-
2262-<td style="border: 1px solid #e0e0a0; background: #ffffe4;">
2263-
2264278Draws an horizontal line with gamma correction at line *y* and at columns *x* to *x2* included, using specified color
2265279
2266-</td>
2267-
2268-</tr>
2269-
2270-<tr style="height: 8px;">
2271-
2272-<td colspan="3">
2273-
2274-</td>
2275-
2276-</tr>
2277-
2278-<tr>
2279-
2280-<td width="10%">
2281-
2282-</td>
2283-
2284-<td colspan="2" style="background: white;">
2285-
2286280**procedure** DrawHorizLine(x, y, x2: int32or64; texture: IBGRAScanner); **overload**;
2287281
2288-</td>
2289-
2290-</tr>
2291-
2292-<tr>
2293-
2294-<td width="10%">
2295-
2296-</td>
2297-
2298-<td width="10%" style="background: white;">
2299-
2300-</td>
2301-
2302-<td style="border: 1px solid #e0e0a0; background: #ffffe4;">
2303-
2304282Draws an horizontal line with gamma correction at line *y* and at columns *x* to *x2* included, using specified scanner to get the source colors
2305283
2306-</td>
2307-
2308-</tr>
2309-
2310-<tr style="height: 8px;">
2311-
2312-<td colspan="3">
2313-
2314-</td>
2315-
2316-</tr>
2317-
2318-<tr>
2319-
2320-<td width="10%">
2321-
2322-</td>
2323-
2324-<td colspan="2" style="background: #f0f0ff;">
2325-
2326284**procedure** FastBlendHorizLine(x, y, x2: int32or64; c: TBGRAPixel); **override**;
2327285
2328-</td>
2329-
2330-</tr>
2331-
2332-<tr>
2333-
2334-<td width="10%">
2335-
2336-</td>
2337-
2338-<td width="10%" style="background: #f0f0ff;">
2339-
2340-</td>
2341-
2342-<td style="border: 1px solid #e0e0a0; background: #ffffe4;">
2343-
2344286Draws an horizontal line without gamma correction at line *y* and at columns *x* to *x2* included, using specified color
2345287
2346-</td>
2347-
2348-</tr>
2349-
2350-<tr style="height: 8px;">
2351-
2352-<td colspan="3">
2353-
2354-</td>
2355-
2356-</tr>
2357-
2358-<tr>
2359-
2360-<td width="10%">
2361-
2362-</td>
2363-
2364-<td colspan="2" style="background: white;">
2365-
2366288**procedure** HorizLine(x, y, x2: int32or64; texture: IBGRAScanner; ADrawMode : TDrawMode); **override**;
2367289
2368-</td>
2369-
2370-</tr>
2371-
2372-<tr>
2373-
2374-<td width="10%">
2375-
2376-</td>
2377-
2378-<td width="10%" style="background: white;">
2379-
2380-</td>
2381-
2382-<td style="border: 1px solid #e0e0a0; background: #ffffe4;">
2383-
2384290Draws an horizontal line at line *y* and at columns *x* to *x2* included, using specified scanner and the specified *ADrawMode*
2385291
2386-</td>
2387-
2388-</tr>
2389-
2390-<tr style="height: 8px;">
2391-
2392-<td colspan="3">
2393-
2394-</td>
2395-
2396-</tr>
2397-
2398-<tr>
2399-
2400-<td width="10%">
2401-
2402-</td>
2403-
2404-<td colspan="2" style="background: #f0f0ff;">
2405-
2406292**procedure** HorizLine(x,y,x2: Int32or64; c: TBGRAPixel; ADrawMode: TDrawMode); **overload**;
2407293
2408-</td>
2409-
2410-</tr>
2411-
2412-<tr>
2413-
2414-<td width="10%">
2415-
2416-</td>
2417-
2418-<td width="10%" style="background: #f0f0ff;">
2419-
2420-</td>
2421-
2422-<td style="border: 1px solid #e0e0a0; background: #ffffe4;">
2423-
2424294Draws an horizontal line at line *y* and at columns *x* to *x2* included, using specified color and the specified *ADrawMode*
2425295
2426-</td>
2427-
2428-</tr>
2429-
2430-<tr style="height: 8px;">
2431-
2432-<td colspan="3">
2433-
2434-</td>
2435-
2436-</tr>
2437-
2438-<tr>
2439-
2440-<td width="10%">
2441-
2442-</td>
2443-
2444-<td colspan="2" style="background: white;">
2445-
2446296**procedure** AlphaHorizLine(x, y, x2: int32or64; alpha: byte); **override**;
2447297
2448-</td>
2449-
2450-</tr>
2451-
2452-<tr>
2453-
2454-<td width="10%">
2455-
2456-</td>
2457-
2458-<td width="10%" style="background: white;">
2459-
2460-</td>
2461-
2462-<td style="border: 1px solid #e0e0a0; background: #ffffe4;">
2463-
2464298Replaces the alpha value of the pixels at line *y* and at columns *x* to *x2* included
2465299
2466-</td>
2467-
2468-</tr>
2469-
2470-<tr style="height: 8px;">
2471-
2472-<td colspan="3">
2473-
2474-</td>
2475-
2476-</tr>
2477-
2478-<tr>
2479-
2480-<td width="10%">
2481-
2482-</td>
2483-
2484-<td colspan="2" style="background: #f0f0ff;">
2485-
2486300**procedure** DrawHorizLineDiff(x, y, x2: int32or64; c, compare: TBGRAPixel;
2487301
2488-</td>
2489-
2490-</tr>
2491-
2492-<tr>
2493-
2494-<td width="10%">
2495-
2496-</td>
2497-
2498-<td width="10%" style="background: #f0f0ff;">
2499-
2500-</td>
2501-
2502-<td style="border: 1px solid #e0e0a0; background: #ffffe4;">
2503-
2504302Draws an horizontal line with gamma correction at line *y* and at columns *x* to *x2* included, using specified color, and with a transparency that increases with the color difference with *compare*. If the difference is greater than *maxDiff*, pixels are not changed
2505303
2506-</td>
2507-
2508-</tr>
2509-
2510-<tr style="height: 8px;">
2511-
2512-<td colspan="3">
2513-
2514-</td>
2515-
2516-</tr>
2517-
2518-<tr>
2519-
2520-<td width="10%">
2521-
2522-</td>
2523-
2524-<td colspan="2" style="background: white;">
2525-
2526304**procedure** SetVertLine(x, y, y2: int32or64; c: TBGRAPixel); **override**;
2527305
2528-</td>
2529-
2530-</tr>
2531-
2532-<tr>
2533-
2534-<td width="10%">
2535-
2536-</td>
2537-
2538-<td width="10%" style="background: white;">
2539-
2540-</td>
2541-
2542-<td style="border: 1px solid #e0e0a0; background: #ffffe4;">
2543-
2544306Replaces a vertical line at column *x* and at row *y* to *y2*
2545307
2546-</td>
2547-
2548-</tr>
2549-
2550-<tr style="height: 8px;">
2551-
2552-<td colspan="3">
2553-
2554-</td>
2555-
2556-</tr>
2557-
2558-<tr>
2559-
2560-<td width="10%">
2561-
2562-</td>
2563-
2564-<td colspan="2" style="background: #f0f0ff;">
2565-
2566308**procedure** XorVertLine(x, y, y2: int32or64; c: TBGRAPixel); **override**;
2567309
2568-</td>
2569-
2570-</tr>
2571-
2572-<tr>
2573-
2574-<td width="10%">
2575-
2576-</td>
2577-
2578-<td width="10%" style="background: #f0f0ff;">
2579-
2580-</td>
2581-
2582-<td style="border: 1px solid #e0e0a0; background: #ffffe4;">
2583-
2584310Xors a vertical line at column *x* and at row *y* to *y2*
2585311
2586-</td>
2587-
2588-</tr>
2589-
2590-<tr style="height: 8px;">
2591-
2592-<td colspan="3">
2593-
2594-</td>
2595-
2596-</tr>
2597-
2598-<tr>
2599-
2600-<td width="10%">
2601-
2602-</td>
2603-
2604-<td colspan="2" style="background: white;">
2605-
2606312**procedure** DrawVertLine(x, y, y2: int32or64; c: TBGRAPixel); **override**;
2607313
2608-</td>
2609-
2610-</tr>
2611-
2612-<tr>
2613-
2614-<td width="10%">
2615-
2616-</td>
2617-
2618-<td width="10%" style="background: white;">
2619-
2620-</td>
2621-
2622-<td style="border: 1px solid #e0e0a0; background: #ffffe4;">
2623-
2624314Draws a vertical line with gamma correction at column *x* and at row *y* to *y2*
2625315
2626-</td>
2627-
2628-</tr>
2629-
2630-<tr style="height: 8px;">
2631-
2632-<td colspan="3">
2633-
2634-</td>
2635-
2636-</tr>
2637-
2638-<tr>
2639-
2640-<td width="10%">
2641-
2642-</td>
2643-
2644-<td colspan="2" style="background: #f0f0ff;">
2645-
2646316**procedure** FastBlendVertLine(x, y, y2: int32or64; c: TBGRAPixel); **override**;
2647317
2648-</td>
2649-
2650-</tr>
2651-
2652-<tr>
2653-
2654-<td width="10%">
2655-
2656-</td>
2657-
2658-<td width="10%" style="background: #f0f0ff;">
2659-
2660-</td>
2661-
2662-<td style="border: 1px solid #e0e0a0; background: #ffffe4;">
2663-
2664318Draws a vertical line without gamma correction at column *x* and at row *y* to *y2*
2665319
2666-</td>
2667-
2668-</tr>
2669-
2670-<tr style="height: 8px;">
2671-
2672-<td colspan="3">
2673-
2674-</td>
2675-
2676-</tr>
2677-
2678-<tr>
2679-
2680-<td width="10%">
2681-
2682-</td>
2683-
2684-<td colspan="2" style="background: white;">
2685-
2686320**procedure** AlphaVertLine(x, y, y2: int32or64; alpha: byte); **override**;
2687321
2688-</td>
2689-
2690-</tr>
2691-
2692-<tr>
2693-
2694-<td width="10%">
2695-
2696-</td>
2697-
2698-<td width="10%" style="background: white;">
2699-
2700-</td>
2701-
2702-<td style="border: 1px solid #e0e0a0; background: #ffffe4;">
2703-
2704322Replace alpha values in a vertical line at column *x* and at row *y* to *y2*
2705323
2706-</td>
2707-
2708-</tr>
2709-
2710-<tr style="height: 8px;">
2711-
2712-<td colspan="3">
2713-
2714-</td>
2715-
2716-</tr>
2717-
2718-<tr>
2719-
2720-<td width="10%">
2721-
2722-</td>
2723-
2724-<td colspan="2" style="background: #f0f0ff;">
2725-
2726324**procedure** VertLine(x,y,y2: Int32or64; c: TBGRAPixel; ADrawMode: TDrawMode);
2727325
2728-</td>
2729-
2730-</tr>
2731-
2732-<tr>
2733-
2734-<td width="10%">
2735-
2736-</td>
2737-
2738-<td width="10%" style="background: #f0f0ff;">
2739-
2740-</td>
2741-
2742-<td style="border: 1px solid #e0e0a0; background: #ffffe4;">
2743-
2744326Draws a vertical line with the specified draw mode at column *x* and at row *y* to *y2*
2745327
2746-</td>
2747-
2748-</tr>
2749-
2750-<tr style="height: 8px;">
2751-
2752-<td colspan="3">
2753-
2754-</td>
2755-
2756-</tr>
2757-
2758-<tr>
2759-
2760-<td width="10%">
2761-
2762-</td>
2763-
2764-<td colspan="2" style="background: white;">
2765-
2766328**procedure** DrawLine(x1, y1, x2, y2: integer; c: TBGRAPixel; DrawLastPixel: boolean; ADrawMode: TDrawMode = dmDrawWithTransparency); **override**;
2767329
2768-</td>
2769-
2770-</tr>
2771-
2772-<tr>
2773-
2774-<td width="10%">
2775-
2776-</td>
2777-
2778-<td width="10%" style="background: white;">
2779-
2780-</td>
2781-
2782-<td style="border: 1px solid #e0e0a0; background: #ffffe4;">
2783-
2784330Draws an aliased line from (x1,y1) to (x2,y2) using Bresenham's algorithm *c* specifies the color. *DrawLastPixel* specifies if (x2,y2) must be drawn. *ADrawMode* specifies the mode to use when drawing the pixels
2785331
2786-</td>
2787-
2788-</tr>
2789-
2790-<tr style="height: 8px;">
2791-
2792-<td colspan="3">
2793-
2794-</td>
2795-
2796-</tr>
2797-
2798-<tr>
2799-
2800-<td width="10%">
2801-
2802-</td>
2803-
2804-<td colspan="2" style="background: #f0f0ff;">
2805-
2806332**procedure** DrawLineAntialias(x1, y1, x2, y2: integer; c: TBGRAPixel; DrawLastPixel: boolean); **override**;
2807333
2808-</td>
2809-
2810-</tr>
2811-
2812-<tr>
2813-
2814-<td width="10%">
2815-
2816-</td>
2817-
2818-<td width="10%" style="background: #f0f0ff;">
2819-
2820-</td>
2821-
2822-<td style="border: 1px solid #e0e0a0; background: #ffffe4;">
2823-
2824334Draws an antialiased line from (x1,y1) to (x2,y2) using an improved version of Bresenham's algorithm *c* specifies the color. *DrawLastPixel* specifies if (x2,y2) must be drawn
2825335
2826-</td>
2827-
2828-</tr>
2829-
2830-<tr style="height: 8px;">
2831-
2832-<td colspan="3">
2833-
2834-</td>
2835-
2836-</tr>
2837-
2838-<tr>
2839-
2840-<td width="10%">
2841-
2842-</td>
2843-
2844-<td colspan="2" style="background: white;">
2845-
2846336**procedure** DrawLineAntialias(x1, y1, x2, y2: integer; c1, c2: TBGRAPixel; dashLen: integer; DrawLastPixel: boolean); **override**;
2847337
2848-</td>
2849-
2850-</tr>
2851-
2852-<tr>
2853-
2854-<td width="10%">
2855-
2856-</td>
2857-
2858-<td width="10%" style="background: white;">
2859-
2860-</td>
2861-
2862-<td style="border: 1px solid #e0e0a0; background: #ffffe4;">
2863-
2864338Draws an antialiased line with two colors *c1* and *c2* as dashes of lenght *dashLen*
2865339
2866-</td>
2867-
2868-</tr>
2869-
2870-<tr style="height: 8px;">
2871-
2872-<td colspan="3">
2873-
2874-</td>
2875-
2876-</tr>
2877-
2878-<tr>
2879-
2880-<td width="10%">
2881-
2882-</td>
2883-
2884-<td colspan="2" style="background: #f0f0ff;">
2885-
2886340**procedure** DrawLineAntialias(x1, y1, x2, y2: integer; c1, c2: TBGRAPixel; dashLen: integer; DrawLastPixel: boolean; **var** DashPos: integer); **override**;
2887341
2888-</td>
2889-
2890-</tr>
2891-
2892-<tr>
2893-
2894-<td width="10%">
2895-
2896-</td>
2897-
2898-<td width="10%" style="background: #f0f0ff;">
2899-
2900-</td>
2901-
2902-<td style="border: 1px solid #e0e0a0; background: #ffffe4;">
2903-
2904342Draws an antialiased line with two colors *c1* and *c2* as dashes of lenght *dashLen*. *DashPos* can be used to specify the start dash position and to retrieve the dash position at the end of the line, in order to draw a polyline with consistent dashes
2905343
2906-</td>
2907-
2908-</tr>
2909-
2910-<tr style="height: 8px;">
2911-
2912-<td colspan="3">
2913-
2914-</td>
2915-
2916-</tr>
2917-
2918-<tr>
2919-
2920-<td width="10%">
2921-
2922-</td>
2923-
2924-<td colspan="2" style="background: white;">
2925-
2926344**procedure** EraseLine(x1, y1, x2, y2: integer; alpha: byte; DrawLastPixel: boolean); **override**;
2927345
2928-</td>
2929-
2930-</tr>
2931-
2932-<tr>
2933-
2934-<td width="10%">
2935-
2936-</td>
2937-
2938-<td width="10%" style="background: white;">
2939-
2940-</td>
2941-
2942-<td style="border: 1px solid #e0e0a0; background: #ffffe4;">
2943-
2944346Erases the line from (x1,y1) to (x2,y2) using Bresenham's algorithm. *alpha* specifies how much to decrease. If *alpha* = 0, nothing is changed and if *alpha* = 255, all pixels become transparent. *DrawListPixel* specifies if (x2,y2) must be changed
2945347
2946-</td>
2947-
2948-</tr>
2949-
2950-<tr style="height: 8px;">
2951-
2952-<td colspan="3">
2953-
2954-</td>
2955-
2956-</tr>
2957-
2958-<tr>
2959-
2960-<td width="10%">
2961-
2962-</td>
2963-
2964-<td colspan="2" style="background: #f0f0ff;">
2965-
2966348**procedure** EraseLineAntialias(x1, y1, x2, y2: integer; alpha: byte; DrawLastPixel: boolean); **override**;
2967349
2968-</td>
2969-
2970-</tr>
2971-
2972-<tr>
2973-
2974-<td width="10%">
2975-
2976-</td>
2977-
2978-<td width="10%" style="background: #f0f0ff;">
2979-
2980-</td>
2981-
2982-<td style="border: 1px solid #e0e0a0; background: #ffffe4;">
2983-
2984350Erases the line from (x1,y1) to (x2,y2) width antialiasing. *alpha* specifies how much to decrease. If *alpha* = 0, nothing is changed and if *alpha* = 255, all pixels become transparent. *DrawListPixel* specifies if (x2,y2) must be changed
2985351
2986-</td>
2987-
2988-</tr>
2989-
2990-<tr style="height: 8px;">
2991-
2992-<td colspan="3">
2993-
2994-</td>
2995-
2996-</tr>
2997-
2998-</table>
2999-
3000352#### Drawing lines and polylines (floating point coordinates)
3001353
3002354These functions use the current pen style/cap/join. The parameter *w* specifies the width of the line and the base unit for dashes. See [[BGRABitmap tutorial 13|coordinate system]].
3003355
3004-<table style="border-collapse: collapse; width: 100%">
3005-
3006-<tr>
3007-
3008-<td width="10%">
3009-
3010-</td>
3011-
3012-<td colspan="2" style="background: white;">
3013-
3014356**procedure** DrawLineAntialias(x1, y1, x2, y2: single; c: TBGRAPixel; w: single); **override**;
3015357
3016-</td>
3017-
3018-</tr>
3019-
3020-<tr>
3021-
3022-<td width="10%">
3023-
3024-</td>
3025-
3026-<td width="10%" style="background: white;">
3027-
3028-</td>
3029-
3030-<td style="border: 1px solid #e0e0a0; background: #ffffe4;">
3031-
3032358Draws a line from (x1,y1) to (x2,y2) using current pen style/cap/join
3033359
3034-</td>
3035-
3036-</tr>
3037-
3038-<tr style="height: 8px;">
3039-
3040-<td colspan="3">
3041-
3042-</td>
3043-
3044-</tr>
3045-
3046-<tr>
3047-
3048-<td width="10%">
3049-
3050-</td>
3051-
3052-<td colspan="2" style="background: #f0f0ff;">
3053-
3054360**procedure** DrawLineAntialias(x1, y1, x2, y2: single; texture: IBGRAScanner; w: single); **override**;
3055361
3056-</td>
3057-
3058-</tr>
3059-
3060-<tr>
3061-
3062-<td width="10%">
3063-
3064-</td>
3065-
3066-<td width="10%" style="background: #f0f0ff;">
3067-
3068-</td>
3069-
3070-<td style="border: 1px solid #e0e0a0; background: #ffffe4;">
3071-
3072362Draws a line from (x1,y1) to (x2,y2) using current pen style/cap/join. *texture* specifies the source color to use when filling the line
3073363
3074-</td>
3075-
3076-</tr>
3077-
3078-<tr style="height: 8px;">
3079-
3080-<td colspan="3">
3081-
3082-</td>
3083-
3084-</tr>
3085-
3086-<tr>
3087-
3088-<td width="10%">
3089-
3090-</td>
3091-
3092-<td colspan="2" style="background: white;">
3093-
3094364**procedure** DrawLineAntialias(x1, y1, x2, y2: single; c: TBGRAPixel; w: single; Closed: boolean); **override**;
3095365
3096-</td>
3097-
3098-</tr>
3099-
3100-<tr>
3101-
3102-<td width="10%">
3103-
3104-</td>
3105-
3106-<td width="10%" style="background: white;">
3107-
3108-</td>
3109-
3110-<td style="border: 1px solid #e0e0a0; background: #ffffe4;">
3111-
3112366Draws a line from (x1,y1) to (x2,y2) using current pen style/cap/join. *Closed* specifies if the end of the line is closed. If it is not closed, a space is left so that the next line can fit
3113367
3114-</td>
3115-
3116-</tr>
3117-
3118-<tr style="height: 8px;">
3119-
3120-<td colspan="3">
3121-
3122-</td>
3123-
3124-</tr>
3125-
3126-<tr>
3127-
3128-<td width="10%">
3129-
3130-</td>
3131-
3132-<td colspan="2" style="background: #f0f0ff;">
3133-
3134368**procedure** DrawLineAntialias(x1, y1, x2, y2: single; texture: IBGRAScanner; w: single; Closed: boolean); **override**;
3135369
3136-</td>
3137-
3138-</tr>
3139-
3140-<tr>
3141-
3142-<td width="10%">
3143-
3144-</td>
3145-
3146-<td width="10%" style="background: #f0f0ff;">
3147-
3148-</td>
3149-
3150-<td style="border: 1px solid #e0e0a0; background: #ffffe4;">
3151-
3152370Same as above with *texture* specifying the source color to use when filling the line
3153371
3154-</td>
3155-
3156-</tr>
3157-
3158-<tr style="height: 8px;">
3159-
3160-<td colspan="3">
3161-
3162-</td>
3163-
3164-</tr>
3165-
3166-<tr>
3167-
3168-<td width="10%">
3169-
3170-</td>
3171-
3172-<td colspan="2" style="background: white;">
3173-
3174372**procedure** DrawPolyLineAntialias(**const** points: **array** **of** TPointF; c: TBGRAPixel; w: single); **override**;
3175373
3176-</td>
3177-
3178-</tr>
3179-
3180-<tr>
3181-
3182-<td width="10%">
3183-
3184-</td>
3185-
3186-<td width="10%" style="background: white;">
3187-
3188-</td>
3189-
3190-<td style="border: 1px solid #e0e0a0; background: #ffffe4;">
3191-
3192374Draws a polyline using current pen style/cap/join
3193375
3194-</td>
3195-
3196-</tr>
3197-
3198-<tr style="height: 8px;">
3199-
3200-<td colspan="3">
3201-
3202-</td>
3203-
3204-</tr>
3205-
3206-<tr>
3207-
3208-<td width="10%">
3209-
3210-</td>
3211-
3212-<td colspan="2" style="background: #f0f0ff;">
3213-
3214376**procedure** DrawPolyLineAntialias(**const** points: **array** **of** TPointF; texture: IBGRAScanner; w: single); **override**;
3215377
3216-</td>
3217-
3218-</tr>
3219-
3220-<tr>
3221-
3222-<td width="10%">
3223-
3224-</td>
3225-
3226-<td width="10%" style="background: #f0f0ff;">
3227-
3228-</td>
3229-
3230-<td style="border: 1px solid #e0e0a0; background: #ffffe4;">
3231-
3232378Draws a polyline using current pen style/cap/join. *texture* specifies the source color to use when filling the line
3233379
3234-</td>
3235-
3236-</tr>
3237-
3238-<tr style="height: 8px;">
3239-
3240-<td colspan="3">
3241-
3242-</td>
3243-
3244-</tr>
3245-
3246-<tr>
3247-
3248-<td width="10%">
3249-
3250-</td>
3251-
3252-<td colspan="2" style="background: white;">
3253-
3254380**procedure** DrawPolyLineAntialias(**const** points: **array** **of** TPointF; c: TBGRAPixel; w: single; Closed: boolean); **override**;
3255381
3256-</td>
3257-
3258-</tr>
3259-
3260-<tr>
3261-
3262-<td width="10%">
3263-
3264-</td>
3265-
3266-<td width="10%" style="background: white;">
3267-
3268-</td>
3269-
3270-<td style="border: 1px solid #e0e0a0; background: #ffffe4;">
3271-
3272382Draws a polyline using current pen style/cap/join. *Closed* specifies if the end of the line is closed. If it is not closed, a space is left so that the next line can fit
3273383
3274-</td>
3275-
3276-</tr>
3277-
3278-<tr style="height: 8px;">
3279-
3280-<td colspan="3">
3281-
3282-</td>
3283-
3284-</tr>
3285-
3286-<tr>
3287-
3288-<td width="10%">
3289-
3290-</td>
3291-
3292-<td colspan="2" style="background: #f0f0ff;">
3293-
3294384**procedure** DrawPolyLineAntialias(**const** points: **array** **of** TPointF; c: TBGRAPixel; w: single; fillcolor: TBGRAPixel); **override**;
3295385
3296-</td>
3297-
3298-</tr>
3299-
3300-<tr>
3301-
3302-<td width="10%">
3303-
3304-</td>
3305-
3306-<td width="10%" style="background: #f0f0ff;">
3307-
3308-</td>
3309-
3310-<td style="border: 1px solid #e0e0a0; background: #ffffe4;">
3311-
3312386Draws a polyline using current pen style/cap/join. *fillcolor* specifies a color to fill the polygon formed by the points
3313387
3314-</td>
3315-
3316-</tr>
3317-
3318-<tr style="height: 8px;">
3319-
3320-<td colspan="3">
3321-
3322-</td>
3323-
3324-</tr>
3325-
3326-<tr>
3327-
3328-<td width="10%">
3329-
3330-</td>
3331-
3332-<td colspan="2" style="background: white;">
3333-
3334388**procedure** DrawPolyLineAntialiasAutocycle(**const** points: **array** **of** TPointF; c: TBGRAPixel; w: single); **override**;
3335389
3336-</td>
3337-
3338-</tr>
3339-
3340-<tr>
3341-
3342-<td width="10%">
3343-
3344-</td>
3345-
3346-<td width="10%" style="background: white;">
3347-
3348-</td>
3349-
3350-<td style="border: 1px solid #e0e0a0; background: #ffffe4;">
3351-
3352390Draws a polyline using current pen style/cap/join. The last point considered as a join with the first point if it has the same coordinate
3353391
3354-</td>
3355-
3356-</tr>
3357-
3358-<tr style="height: 8px;">
3359-
3360-<td colspan="3">
3361-
3362-</td>
3363-
3364-</tr>
3365-
3366-<tr>
3367-
3368-<td width="10%">
3369-
3370-</td>
3371-
3372-<td colspan="2" style="background: #f0f0ff;">
3373-
3374392**procedure** DrawPolygonAntialias(**const** points: **array** **of** TPointF; c: TBGRAPixel; w: single); **override**;
3375393
3376-</td>
3377-
3378-</tr>
3379-
3380-<tr>
3381-
3382-<td width="10%">
3383-
3384-</td>
3385-
3386-<td width="10%" style="background: #f0f0ff;">
3387-
3388-</td>
3389-
3390-<td style="border: 1px solid #e0e0a0; background: #ffffe4;">
3391-
3392394Draws a polygon using current pen style/cap/join. The polygon is always closed. You don't need to set the last point to be the same as the first point
3393395
3394-</td>
3395-
3396-</tr>
3397-
3398-<tr style="height: 8px;">
3399-
3400-<td colspan="3">
3401-
3402-</td>
3403-
3404-</tr>
3405-
3406-<tr>
3407-
3408-<td width="10%">
3409-
3410-</td>
3411-
3412-<td colspan="2" style="background: white;">
3413-
3414396**procedure** DrawPolygonAntialias(**const** points: **array** **of** TPointF; texture: IBGRAScanner; w: single); **override**;
3415397
3416-</td>
3417-
3418-</tr>
3419-
3420-<tr>
3421-
3422-<td width="10%">
3423-
3424-</td>
3425-
3426-<td width="10%" style="background: white;">
3427-
3428-</td>
3429-
3430-<td style="border: 1px solid #e0e0a0; background: #ffffe4;">
3431-
3432398Draws a polygon using current pen style/cap/join. The polygon is always closed. You don't need to set the last point to be the same as the first point
3433399
3434-</td>
3435-
3436-</tr>
3437-
3438-<tr style="height: 8px;">
3439-
3440-<td colspan="3">
3441-
3442-</td>
3443-
3444-</tr>
3445-
3446-<tr>
3447-
3448-<td width="10%">
3449-
3450-</td>
3451-
3452-<td colspan="2" style="background: #f0f0ff;">
3453-
3454400**procedure** DrawPolygonAntialias(**const** points: **array** **of** TPointF; c: TBGRAPixel; w: single; fillcolor: TBGRAPixel); **override**;
3455401
3456-</td>
3457-
3458-</tr>
3459-
3460-<tr>
3461-
3462-<td width="10%">
3463-
3464-</td>
3465-
3466-<td width="10%" style="background: #f0f0ff;">
3467-
3468-</td>
3469-
3470-<td style="border: 1px solid #e0e0a0; background: #ffffe4;">
3471-
3472402Draws a filled polygon using current pen style/cap/join. The polygon is always closed. You don't need to set the last point to be the same as the first point.
3473403
3474-</td>
3475-
3476-</tr>
3477-
3478-<tr style="height: 8px;">
3479-
3480-<td colspan="3">
3481-
3482-</td>
3483-
3484-</tr>
3485-
3486-<tr>
3487-
3488-<td width="10%">
3489-
3490-</td>
3491-
3492-<td colspan="2" style="background: white;">
3493-
3494404**procedure** EraseLineAntialias(x1, y1, x2, y2: single; alpha: byte; w: single); **override**;
3495405
3496-</td>
3497-
3498-</tr>
3499-
3500-<tr>
3501-
3502-<td width="10%">
3503-
3504-</td>
3505-
3506-<td width="10%" style="background: white;">
3507-
3508-</td>
3509-
3510-<td style="border: 1px solid #e0e0a0; background: #ffffe4;">
3511-
3512406Erases a line from (x1,y1) to (x2,y2) using current pen style/cap/join
3513407
3514-</td>
3515-
3516-</tr>
3517-
3518-<tr style="height: 8px;">
3519-
3520-<td colspan="3">
3521-
3522-</td>
3523-
3524-</tr>
3525-
3526-<tr>
3527-
3528-<td width="10%">
3529-
3530-</td>
3531-
3532-<td colspan="2" style="background: #f0f0ff;">
3533-
3534408**procedure** EraseLineAntialias(x1, y1, x2, y2: single; alpha: byte; w: single; Closed: boolean); **override**;
3535409
3536-</td>
3537-
3538-</tr>
3539-
3540-<tr>
3541-
3542-<td width="10%">
3543-
3544-</td>
3545-
3546-<td width="10%" style="background: #f0f0ff;">
3547-
3548-</td>
3549-
3550-<td style="border: 1px solid #e0e0a0; background: #ffffe4;">
3551-
3552410Erases a line from (x1,y1) to (x2,y2) using current pen style/cap/join. *Closed* specifies if the end of the line is closed. If it is not closed, a space is left so that the next line can fit
3553411
3554-</td>
3555-
3556-</tr>
3557-
3558-<tr style="height: 8px;">
3559-
3560-<td colspan="3">
3561-
3562-</td>
3563-
3564-</tr>
3565-
3566-<tr>
3567-
3568-<td width="10%">
3569-
3570-</td>
3571-
3572-<td colspan="2" style="background: white;">
3573-
3574412**procedure** ErasePolyLineAntialias(**const** points: **array** **of** TPointF; alpha: byte; w: single); **override**;
3575413
3576-</td>
3577-
3578-</tr>
3579-
3580-<tr>
3581-
3582-<td width="10%">
3583-
3584-</td>
3585-
3586-<td width="10%" style="background: white;">
3587-
3588-</td>
3589-
3590-<td style="border: 1px solid #e0e0a0; background: #ffffe4;">
3591-
3592414Erases a polyline using current pen style/cap/join
3593415
3594-</td>
3595-
3596-</tr>
3597-
3598-<tr style="height: 8px;">
3599-
3600-<td colspan="3">
3601-
3602-</td>
3603-
3604-</tr>
3605-
3606-</table>
3607-
3608416#### Rectangles (integer coordinates)
3609417
3610418The integer coordinates of rectangles interpreted such that that the bottom/right pixels are not drawn. The width is equal to x2-x, and pixels are drawn from x to x2-1. If x = x2, then nothing is drawn. See [[BGRABitmap tutorial 13|coordinate system]].\
3611419These functions do not take into account current pen style/cap/join. They draw a continuous 1-pixel width border
3612420
3613-<table style="border-collapse: collapse; width: 100%">
3614-
3615-<tr>
3616-
3617-<td width="10%">
3618-
3619-</td>
3620-
3621-<td colspan="2" style="background: white;">
3622-
3623421**procedure** Rectangle(x, y, x2, y2: integer; c: TBGRAPixel; mode: TDrawMode); **override**;
3624422
3625-</td>
3626-
3627-</tr>
3628-
3629-<tr>
3630-
3631-<td width="10%">
3632-
3633-</td>
3634-
3635-<td width="10%" style="background: white;">
3636-
3637-</td>
3638-
3639-<td style="border: 1px solid #e0e0a0; background: #ffffe4;">
3640-
3641423Draw a size border of a rectangle, using the specified *mode*
3642424
3643-</td>
3644-
3645-</tr>
3646-
3647-<tr style="height: 8px;">
3648-
3649-<td colspan="3">
3650-
3651-</td>
3652-
3653-</tr>
3654-
3655-<tr>
3656-
3657-<td width="10%">
3658-
3659-</td>
3660-
3661-<td colspan="2" style="background: #f0f0ff;">
3662-
3663425**procedure** Rectangle(x, y, x2, y2: integer; BorderColor, FillColor: TBGRAPixel; mode: TDrawMode); **override**;
3664426
3665-</td>
3666-
3667-</tr>
3668-
3669-<tr>
3670-
3671-<td width="10%">
3672-
3673-</td>
3674-
3675-<td width="10%" style="background: #f0f0ff;">
3676-
3677-</td>
3678-
3679-<td style="border: 1px solid #e0e0a0; background: #ffffe4;">
3680-
3681427Draw a filled rectangle with a border of color *BorderColor*, using the specified *mode*
3682428
3683-</td>
3684-
3685-</tr>
3686-
3687-<tr style="height: 8px;">
3688-
3689-<td colspan="3">
3690-
3691-</td>
3692-
3693-</tr>
3694-
3695-<tr>
3696-
3697-<td width="10%">
3698-
3699-</td>
3700-
3701-<td colspan="2" style="background: white;">
3702-
3703429**procedure** FillRect(x, y, x2, y2: integer; c: TBGRAPixel; mode: TDrawMode); **override**; **overload**;
3704430
3705-</td>
3706-
3707-</tr>
3708-
3709-<tr>
3710-
3711-<td width="10%">
3712-
3713-</td>
3714-
3715-<td width="10%" style="background: white;">
3716-
3717-</td>
3718-
3719-<td style="border: 1px solid #e0e0a0; background: #ffffe4;">
3720-
3721431Fills completely a rectangle, without any border, with the specified *mode*
3722432
3723-</td>
3724-
3725-</tr>
3726-
3727-<tr style="height: 8px;">
3728-
3729-<td colspan="3">
3730-
3731-</td>
3732-
3733-</tr>
3734-
3735-<tr>
3736-
3737-<td width="10%">
3738-
3739-</td>
3740-
3741-<td colspan="2" style="background: #f0f0ff;">
3742-
3743433**procedure** FillRect(x, y, x2, y2: integer; texture: IBGRAScanner; mode: TDrawMode); **override**; **overload**;
3744434
3745-</td>
3746-
3747-</tr>
3748-
3749-<tr>
3750-
3751-<td width="10%">
3752-
3753-</td>
3754-
3755-<td width="10%" style="background: #f0f0ff;">
3756-
3757-</td>
3758-
3759-<td style="border: 1px solid #e0e0a0; background: #ffffe4;">
3760-
3761435Fills completely a rectangle, without any border, with the specified *texture* and with the specified *mode*
3762436
3763-</td>
3764-
3765-</tr>
3766-
3767-<tr style="height: 8px;">
3768-
3769-<td colspan="3">
3770-
3771-</td>
3772-
3773-</tr>
3774-
3775-<tr>
3776-
3777-<td width="10%">
3778-
3779-</td>
3780-
3781-<td colspan="2" style="background: white;">
3782-
3783437**procedure** AlphaFillRect(x, y, x2, y2: integer; alpha: byte); **override**;
3784438
3785-</td>
3786-
3787-</tr>
3788-
3789-<tr>
3790-
3791-<td width="10%">
3792-
3793-</td>
3794-
3795-<td width="10%" style="background: white;">
3796-
3797-</td>
3798-
3799-<td style="border: 1px solid #e0e0a0; background: #ffffe4;">
3800-
3801439Sets the alpha value within the specified rectangle
3802440
3803-</td>
3804-
3805-</tr>
3806-
3807-<tr style="height: 8px;">
3808-
3809-<td colspan="3">
3810-
3811-</td>
3812-
3813-</tr>
3814-
3815-<tr>
3816-
3817-<td width="10%">
3818-
3819-</td>
3820-
3821-<td colspan="2" style="background: #f0f0ff;">
3822-
3823441**procedure** RoundRect(X1, Y1, X2, Y2: integer; DX, DY: integer; BorderColor, FillColor: TBGRAPixel; ADrawMode: TDrawMode = dmDrawWithTransparency); **override**;
3824442
3825-</td>
3826-
3827-</tr>
3828-
3829-<tr>
3830-
3831-<td width="10%">
3832-
3833-</td>
3834-
3835-<td width="10%" style="background: #f0f0ff;">
3836-
3837-</td>
3838-
3839-<td style="border: 1px solid #e0e0a0; background: #ffffe4;">
3840-
3841443Draws a filled round rectangle, with corners having an elliptical diameter of *DX* and *DY*
3842444
3843-</td>
3844-
3845-</tr>
3846-
3847-<tr style="height: 8px;">
3848-
3849-<td colspan="3">
3850-
3851-</td>
3852-
3853-</tr>
3854-
3855-<tr>
3856-
3857-<td width="10%">
3858-
3859-</td>
3860-
3861-<td colspan="2" style="background: white;">
3862-
3863445**procedure** RoundRect(X1, Y1, X2, Y2: integer; DX, DY: integer; BorderColor: TBGRAPixel; ADrawMode: TDrawMode = dmDrawWithTransparency); **override**;
3864446
3865-</td>
3866-
3867-</tr>
3868-
3869-<tr>
3870-
3871-<td width="10%">
3872-
3873-</td>
3874-
3875-<td width="10%" style="background: white;">
3876-
3877-</td>
3878-
3879-<td style="border: 1px solid #e0e0a0; background: #ffffe4;">
3880-
3881447Draws a round rectangle, with corners having an elliptical diameter of *DX* and *DY*
3882448
3883-</td>
3884-
3885-</tr>
3886-
3887-<tr style="height: 8px;">
3888-
3889-<td colspan="3">
3890-
3891-</td>
3892-
3893-</tr>
3894-
3895-</table>
3896-
3897449#### Rectangles and ellipses (floating point coordinates)
3898450
3899451These functions use the current pen style/cap/join. The parameter *w* specifies the width of the line and the base unit for dashes\
3900452The coordinates are pixel-centered, so that when filling a rectangle, if the supplied values are integers, the border will be half transparent. If you want the border to be completely filled, you can subtract/add 0.5 to the coordinates to include the remaining thin border. See [[BGRABitmap tutorial 13|coordinate system]].
3901453
3902-<table style="border-collapse: collapse; width: 100%">
3903-
3904-<tr>
3905-
3906-<td width="10%">
3907-
3908-</td>
3909-
3910-<td colspan="2" style="background: white;">
3911-
3912454**procedure** RectangleAntialias(x, y, x2, y2: single; c: TBGRAPixel; w: single; back: TBGRAPixel); **override**;
3913455
3914-</td>
3915-
3916-</tr>
3917-
3918-<tr>
3919-
3920-<td width="10%">
3921-
3922-</td>
3923-
3924-<td width="10%" style="background: white;">
3925-
3926-</td>
3927-
3928-<td style="border: 1px solid #e0e0a0; background: #ffffe4;">
3929-
3930456Draws a rectangle with antialiasing and fills it with color *back*. Note that the pixel (x2,y2) is included contrary to integer coordinates
3931457
3932-</td>
3933-
3934-</tr>
3935-
3936-<tr style="height: 8px;">
3937-
3938-<td colspan="3">
3939-
3940-</td>
3941-
3942-</tr>
3943-
3944-<tr>
3945-
3946-<td width="10%">
3947-
3948-</td>
3949-
3950-<td colspan="2" style="background: #f0f0ff;">
3951-
3952458**procedure** RectangleAntialias(x, y, x2, y2: single; texture: IBGRAScanner; w: single); **override**;
3953459
3954-</td>
3955-
3956-</tr>
3957-
3958-<tr>
3959-
3960-<td width="10%">
3961-
3962-</td>
3963-
3964-<td width="10%" style="background: #f0f0ff;">
3965-
3966-</td>
3967-
3968-<td style="border: 1px solid #e0e0a0; background: #ffffe4;">
3969-
3970460Draws a rectangle with antialiasing. Note that the pixel (x2,y2) is included contrary to integer coordinates
3971461
3972-</td>
3973-
3974-</tr>
3975-
3976-<tr style="height: 8px;">
3977-
3978-<td colspan="3">
3979-
3980-</td>
3981-
3982-</tr>
3983-
3984-<tr>
3985-
3986-<td width="10%">
3987-
3988-</td>
3989-
3990-<td colspan="2" style="background: white;">
3991-
3992462**procedure** FillRectAntialias(x, y, x2, y2: single; c: TBGRAPixel); **override**;
3993463
3994-</td>
3995-
3996-</tr>
3997-
3998-<tr>
3999-
4000-<td width="10%">
4001-
4002-</td>
4003-
4004-<td width="10%" style="background: white;">
4005-
4006-</td>
4007-
4008-<td style="border: 1px solid #e0e0a0; background: #ffffe4;">
4009-
4010464Fills a rectangle with antialiasing. For example (-0.5,-0.5,0.5,0.5) fills one pixel
4011465
4012-</td>
4013-
4014-</tr>
4015-
4016-<tr style="height: 8px;">
4017-
4018-<td colspan="3">
4019-
4020-</td>
4021-
4022-</tr>
4023-
4024-<tr>
4025-
4026-<td width="10%">
4027-
4028-</td>
4029-
4030-<td colspan="2" style="background: #f0f0ff;">
4031-
4032466**procedure** FillRectAntialias(x, y, x2, y2: single; texture: IBGRAScanner); **override**;
4033467
4034-</td>
4035-
4036-</tr>
4037-
4038-<tr>
4039-
4040-<td width="10%">
4041-
4042-</td>
4043-
4044-<td width="10%" style="background: #f0f0ff;">
4045-
4046-</td>
4047-
4048-<td style="border: 1px solid #e0e0a0; background: #ffffe4;">
4049-
4050468Fills a rectangle with a texture
4051469
4052-</td>
4053-
4054-</tr>
4055-
4056-<tr style="height: 8px;">
4057-
4058-<td colspan="3">
4059-
4060-</td>
4061-
4062-</tr>
4063-
4064-<tr>
4065-
4066-<td width="10%">
4067-
4068-</td>
4069-
4070-<td colspan="2" style="background: white;">
4071-
4072470**procedure** EraseRectAntialias(x, y, x2, y2: single; alpha: byte); **override**;
4073471
4074-</td>
4075-
4076-</tr>
4077-
4078-<tr>
4079-
4080-<td width="10%">
4081-
4082-</td>
4083-
4084-<td width="10%" style="background: white;">
4085-
4086-</td>
4087-
4088-<td style="border: 1px solid #e0e0a0; background: #ffffe4;">
4089-
4090472Erases the content of a rectangle with antialiasing
4091473
4092-</td>
4093-
4094-</tr>
4095-
4096-<tr style="height: 8px;">
4097-
4098-<td colspan="3">
4099-
4100-</td>
4101-
4102-</tr>
4103-
4104-<tr>
4105-
4106-<td width="10%">
4107-
4108-</td>
4109-
4110-<td colspan="2" style="background: #f0f0ff;">
4111-
4112474**procedure** RoundRectAntialias(x,y,x2,y2,rx,ry: single; c: TBGRAPixel; w: single; options: TRoundRectangleOptions = \[\]); **override**;
4113475
4114-</td>
4115-
4116-</tr>
4117-
4118-<tr>
4119-
4120-<td width="10%">
4121-
4122-</td>
4123-
4124-<td width="10%" style="background: #f0f0ff;">
4125-
4126-</td>
4127-
4128-<td style="border: 1px solid #e0e0a0; background: #ffffe4;">
4129-
4130476Draws a rounded rectangle border with antialiasing. The corners have an elliptical radius of *rx* and *ry*. *options* specifies how to draw the corners. See [[BGRABitmap Geometry types|geometry types]]
4131477
4132-</td>
4133-
4134-</tr>
4135-
4136-<tr style="height: 8px;">
4137-
4138-<td colspan="3">
4139-
4140-</td>
4141-
4142-</tr>
4143-
4144-<tr>
4145-
4146-<td width="10%">
4147-
4148-</td>
4149-
4150-<td colspan="2" style="background: white;">
4151-
4152478**procedure** RoundRectAntialias(x,y,x2,y2,rx,ry: single; texture: IBGRAScanner; w: single; options: TRoundRectangleOptions = \[\]); **override**;
4153479
4154-</td>
4155-
4156-</tr>
4157-
4158-<tr>
4159-
4160-<td width="10%">
4161-
4162-</td>
4163-
4164-<td width="10%" style="background: white;">
4165-
4166-</td>
4167-
4168-<td style="border: 1px solid #e0e0a0; background: #ffffe4;">
4169-
4170480Draws a rounded rectangle border with the specified texture. The corners have an elliptical radius of *rx* and *ry*. *options* specifies how to draw the corners. See [[BGRABitmap Geometry types|geometry types]]
4171481
4172-</td>
4173-
4174-</tr>
4175-
4176-<tr style="height: 8px;">
4177-
4178-<td colspan="3">
4179-
4180-</td>
4181-
4182-</tr>
4183-
4184-<tr>
4185-
4186-<td width="10%">
4187-
4188-</td>
4189-
4190-<td colspan="2" style="background: #f0f0ff;">
4191-
4192482**procedure** RoundRectAntialias(x,y,x2,y2,rx,ry: single; pencolor: TBGRAPixel; w: single; fillcolor: TBGRAPixel; options: TRoundRectangleOptions = \[\]); **override**;
4193483
4194-</td>
4195-
4196-</tr>
4197-
4198-<tr>
4199-
4200-<td width="10%">
4201-
4202-</td>
4203-
4204-<td width="10%" style="background: #f0f0ff;">
4205-
4206-</td>
4207-
4208-<td style="border: 1px solid #e0e0a0; background: #ffffe4;">
4209-
4210484Draws and fills a round rectangle
4211485
4212-</td>
4213-
4214-</tr>
4215-
4216-<tr style="height: 8px;">
4217-
4218-<td colspan="3">
4219-
4220-</td>
4221-
4222-</tr>
4223-
4224-<tr>
4225-
4226-<td width="10%">
4227-
4228-</td>
4229-
4230-<td colspan="2" style="background: white;">
4231-
4232486**procedure** RoundRectAntialias(x,y,x2,y2,rx,ry: single; penTexture: IBGRAScanner; w: single; fillTexture: IBGRAScanner; options: TRoundRectangleOptions = \[\]); **override**;
4233487
4234-</td>
4235-
4236-</tr>
4237-
4238-<tr>
4239-
4240-<td width="10%">
4241-
4242-</td>
4243-
4244-<td width="10%" style="background: white;">
4245-
4246-</td>
4247-
4248-<td style="border: 1px solid #e0e0a0; background: #ffffe4;">
4249-
4250488Draws and fills a round rectangle with textures
4251489
4252-</td>
4253-
4254-</tr>
4255-
4256-<tr style="height: 8px;">
4257-
4258-<td colspan="3">
4259-
4260-</td>
4261-
4262-</tr>
4263-
4264-<tr>
4265-
4266-<td width="10%">
4267-
4268-</td>
4269-
4270-<td colspan="2" style="background: #f0f0ff;">
4271-
4272490**procedure** FillRoundRectAntialias(x,y,x2,y2,rx,ry: single; c: TBGRAPixel; options: TRoundRectangleOptions = \[\]); **override**;
4273491
4274-</td>
4275-
4276-</tr>
4277-
4278-<tr>
4279-
4280-<td width="10%">
4281-
4282-</td>
4283-
4284-<td width="10%" style="background: #f0f0ff;">
4285-
4286-</td>
4287-
4288-<td style="border: 1px solid #e0e0a0; background: #ffffe4;">
4289-
4290492Fills a rounded rectangle with antialiasing. The corners have an elliptical radius of *rx* and *ry*. *options* specifies how to draw the corners. See [[BGRABitmap Geometry types|geometry types]]
4291493
4292-</td>
4293-
4294-</tr>
4295-
4296-<tr style="height: 8px;">
4297-
4298-<td colspan="3">
4299-
4300-</td>
4301-
4302-</tr>
4303-
4304-<tr>
4305-
4306-<td width="10%">
4307-
4308-</td>
4309-
4310-<td colspan="2" style="background: white;">
4311-
4312494**procedure** FillRoundRectAntialias(x,y,x2,y2,rx,ry: single; texture: IBGRAScanner; options: TRoundRectangleOptions = \[\]); **override**;
4313495
4314-</td>
4315-
4316-</tr>
4317-
4318-<tr>
4319-
4320-<td width="10%">
4321-
4322-</td>
4323-
4324-<td width="10%" style="background: white;">
4325-
4326-</td>
4327-
4328-<td style="border: 1px solid #e0e0a0; background: #ffffe4;">
4329-
4330496Fills a rounded rectangle with a texture
4331497
4332-</td>
4333-
4334-</tr>
4335-
4336-<tr style="height: 8px;">
4337-
4338-<td colspan="3">
4339-
4340-</td>
4341-
4342-</tr>
4343-
4344-<tr>
4345-
4346-<td width="10%">
4347-
4348-</td>
4349-
4350-<td colspan="2" style="background: #f0f0ff;">
4351-
4352498**procedure** EraseRoundRectAntialias(x,y,x2,y2,rx,ry: single; alpha: byte; options: TRoundRectangleOptions = \[\]); **override**;
4353499
4354-</td>
4355-
4356-</tr>
4357-
4358-<tr>
4359-
4360-<td width="10%">
4361-
4362-</td>
4363-
4364-<td width="10%" style="background: #f0f0ff;">
4365-
4366-</td>
4367-
4368-<td style="border: 1px solid #e0e0a0; background: #ffffe4;">
4369-
4370500Erases the content of a rounded rectangle with a texture
4371501
4372-</td>
4373-
4374-</tr>
4375-
4376-<tr style="height: 8px;">
4377-
4378-<td colspan="3">
4379-
4380-</td>
4381-
4382-</tr>
4383-
4384-<tr>
4385-
4386-<td width="10%">
4387-
4388-</td>
4389-
4390-<td colspan="2" style="background: white;">
4391-
4392502**procedure** EllipseAntialias(x, y, rx, ry: single; c: TBGRAPixel; w: single); **override**;
4393503
4394-</td>
4395-
4396-</tr>
4397-
4398-<tr>
4399-
4400-<td width="10%">
4401-
4402-</td>
4403-
4404-<td width="10%" style="background: white;">
4405-
4406-</td>
4407-
4408-<td style="border: 1px solid #e0e0a0; background: #ffffe4;">
4409-
4410504Draws an ellipse with antialising. *rx* is the horizontal radius and *ry* the vertical radius
4411505
4412-</td>
4413-
4414-</tr>
4415-
4416-<tr style="height: 8px;">
4417-
4418-<td colspan="3">
4419-
4420-</td>
4421-
4422-</tr>
4423-
4424-<tr>
4425-
4426-<td width="10%">
4427-
4428-</td>
4429-
4430-<td colspan="2" style="background: #f0f0ff;">
4431-
4432506**procedure** EllipseAntialias(x, y, rx, ry: single; texture: IBGRAScanner; w: single); **override**;
4433507
4434-</td>
4435-
4436-</tr>
4437-
4438-<tr>
4439-
4440-<td width="10%">
4441-
4442-</td>
4443-
4444-<td width="10%" style="background: #f0f0ff;">
4445-
4446-</td>
4447-
4448-<td style="border: 1px solid #e0e0a0; background: #ffffe4;">
4449-
4450508Draws an ellipse border with a *texture*
4451509
4452-</td>
4453-
4454-</tr>
4455-
4456-<tr style="height: 8px;">
4457-
4458-<td colspan="3">
4459-
4460-</td>
4461-
4462-</tr>
4463-
4464-<tr>
4465-
4466-<td width="10%">
4467-
4468-</td>
4469-
4470-<td colspan="2" style="background: white;">
4471-
4472510**procedure** EllipseAntialias(x, y, rx, ry: single; c: TBGRAPixel; w: single; back: TBGRAPixel); **override**;
4473511
4474-</td>
4475-
4476-</tr>
4477-
4478-<tr>
4479-
4480-<td width="10%">
4481-
4482-</td>
4483-
4484-<td width="10%" style="background: white;">
4485-
4486-</td>
4487-
4488-<td style="border: 1px solid #e0e0a0; background: #ffffe4;">
4489-
4490512Draws and fills an ellipse
4491513
4492-</td>
4493-
4494-</tr>
4495-
4496-<tr style="height: 8px;">
4497-
4498-<td colspan="3">
4499-
4500-</td>
4501-
4502-</tr>
4503-
4504-<tr>
4505-
4506-<td width="10%">
4507-
4508-</td>
4509-
4510-<td colspan="2" style="background: #f0f0ff;">
4511-
4512514**procedure** FillEllipseAntialias(x, y, rx, ry: single; c: TBGRAPixel); **override**;
4513515
4514-</td>
4515-
4516-</tr>
4517-
4518-<tr>
4519-
4520-<td width="10%">
4521-
4522-</td>
4523-
4524-<td width="10%" style="background: #f0f0ff;">
4525-
4526-</td>
4527-
4528-<td style="border: 1px solid #e0e0a0; background: #ffffe4;">
4529-
4530516Fills an ellipse
4531517
4532-</td>
4533-
4534-</tr>
4535-
4536-<tr style="height: 8px;">
4537-
4538-<td colspan="3">
4539-
4540-</td>
4541-
4542-</tr>
4543-
4544-<tr>
4545-
4546-<td width="10%">
4547-
4548-</td>
4549-
4550-<td colspan="2" style="background: white;">
4551-
4552518**procedure** FillEllipseAntialias(x, y, rx, ry: single; texture: IBGRAScanner); **override**;
4553519
4554-</td>
4555-
4556-</tr>
4557-
4558-<tr>
4559-
4560-<td width="10%">
4561-
4562-</td>
4563-
4564-<td width="10%" style="background: white;">
4565-
4566-</td>
4567-
4568-<td style="border: 1px solid #e0e0a0; background: #ffffe4;">
4569-
4570520Fills an ellipse with a *texture*
4571521
4572-</td>
4573-
4574-</tr>
4575-
4576-<tr style="height: 8px;">
4577-
4578-<td colspan="3">
4579-
4580-</td>
4581-
4582-</tr>
4583-
4584-<tr>
4585-
4586-<td width="10%">
4587-
4588-</td>
4589-
4590-<td colspan="2" style="background: #f0f0ff;">
4591-
4592522**procedure** FillEllipseLinearColorAntialias(x, y, rx, ry: single; outercolor, innercolor: TBGRAPixel); **override**;
4593523
4594-</td>
4595-
4596-</tr>
4597-
4598-<tr>
4599-
4600-<td width="10%">
4601-
4602-</td>
4603-
4604-<td width="10%" style="background: #f0f0ff;">
4605-
4606-</td>
4607-
4608-<td style="border: 1px solid #e0e0a0; background: #ffffe4;">
4609-
4610524Fills an ellipse with a gradient of color. *outercolor* specifies the end color of the gradient on the border of the ellipse and *innercolor* the end color of the gradient at the center of the ellipse
4611525
4612-</td>
4613-
4614-</tr>
4615-
4616-<tr style="height: 8px;">
4617-
4618-<td colspan="3">
4619-
4620-</td>
4621-
4622-</tr>
4623-
4624-<tr>
4625-
4626-<td width="10%">
4627-
4628-</td>
4629-
4630-<td colspan="2" style="background: white;">
4631-
4632526**procedure** EraseEllipseAntialias(x, y, rx, ry: single; alpha: byte); **override**;
4633527
4634-</td>
4635-
4636-</tr>
4637-
4638-<tr>
4639-
4640-<td width="10%">
4641-
4642-</td>
4643-
4644-<td width="10%" style="background: white;">
4645-
4646-</td>
4647-
4648-<td style="border: 1px solid #e0e0a0; background: #ffffe4;">
4649-
4650528Erases the content of an ellipse
4651-
4652-</td>
4653-
4654-</tr>
4655-
4656-<tr style="height: 8px;">
4657-
4658-<td colspan="3">
4659-
4660-</td>
4661-
4662-</tr>
4663-
4664-</table>
4665529
4666530Additionally, there are also FloodFill() and Arc() methods.
4667531
4668532### Text functions
4669533
4670534``` pascal
4671535class TBGRABitmap
4672536 property FontName: string; read write;
4673537 property FontStyle: TFontStyles; read write;
4674538 property FontQuality : TBGRAFontQuality; read write;
4675539 property FontOrientation: integer; read write;
4676540 property FontHeight: integer; read write;
4677541 property FontAntialias: Boolean; read write;
4678542 property FontFullHeight: integer; read write;
4679543 property FontPixelMetric: TFontPixelMetric;
4680544 property FontRenderer: TBGRACustomFontRenderer; read write;
4681545
4682546 procedure TextOut(x, y: single; sUTF8: string; c: TBGRAPixel; align: TAlignment);
4683547 procedure TextOut(x, y: single; sUTF8: string; texture: IBGRAScanner; align: TAlignment);
4684548 procedure TextOutAngle(x, y: single; orientationTenthDegCCW: integer; sUTF8: string; c: TBGRAPixel; align: TAlignment);
4685549 procedure TextOutAngle(x, y: single; orientationTenthDegCCW: integer; sUTF8: string; texture: IBGRAScanner; align: TAlignment);
4686550 procedure TextOut(x, y: single; sUTF8: string; c: TBGRAPixel);
4687551 procedure TextOut(x, y: single; sUTF8: string; c: TColor);
4688552 procedure TextOut(x, y: single; sUTF8: string; texture: IBGRAScanner);
4689553 procedure TextRect(ARect: TRect; x, y: integer; sUTF8: string; style: TTextStyle; c: TBGRAPixel);
4690554 procedure TextRect(ARect: TRect; x, y: integer; sUTF8: string; style: TTextStyle; texture: IBGRAScanner);
4691555 procedure TextRect(ARect: TRect; sUTF8: string; halign: TAlignment; valign: TTextLayout; c: TBGRAPixel);
4692556 procedure TextRect(ARect: TRect; sUTF8: string; halign: TAlignment; valign: TTextLayout; texture: IBGRAScanner);
4693557 function TextSize(sUTF8: string): TSize;
4694558```
4695559
4696560See **[[TBGRABitmap text functions]]**.
4697561
4698562---
4699563*From the Free Pascal wiki, page "TBGRABitmap class", as it stood on 2024-04-03 after a change by Circular, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's [[Licensing]] page. If you have concerns about this material, [message the admin](/wiki-contact).*

Back to history