## Documentation

Table of Contents
Class Inheritance Tree
Widget Screenshots
Package groups

1.     -----------------------------------------------------------------------

2.     --               GtkAda - Ada95 binding for Gtk+/Gnome               --

3.     --                                                                   --

4.     --                    Copyright (C) 2010, AdaCore                    --

5.     --                                                                   --

6.     -- This library is free software; you can redistribute it and/or     --

7.     -- modify it under the terms of the GNU General Public               --

8.     -- License as published by the Free Software Foundation; either      --

9.     -- version 2 of the License, or (at your option) any later version.  --

10.     --                                                                   --

11.     -- This library is distributed in the hope that it will be useful,   --

12.     -- but WITHOUT ANY WARRANTY; without even the implied warranty of    --

13.     -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU --

14.     -- General Public License for more details.                          --

15.     --                                                                   --

16.     -- You should have received a copy of the GNU General Public         --

17.     -- License along with this library; if not, write to the             --

18.     -- Free Software Foundation, Inc., 59 Temple Place - Suite 330,      --

19.     -- Boston, MA 02111-1307, USA.                                       --

20.     --                                                                   --

21.     -- As a special exception, if other files instantiate generics from  --

22.     -- this unit, or you link this unit with other files to produce an   --

23.     -- executable, this  unit  does not  by itself cause  the resulting  --

24.     -- executable to be covered by the GNU General Public License. This  --

25.     -- exception does not however invalidate any other reasons why the   --

26.     -- executable file  might be covered by the  GNU Public License.     --

27.     -----------------------------------------------------------------------

29.     --  <description>

30.     --  A Cairo_Pattern is the paintbrush with which cairo draws. The primary use

31.     --  of patterns is as the source for all cairo drawing operations.

32.     --

33.     --  A cairo pattern is created by using one of the many constructors, of the

34.     --  form Cairo_Pattern.Create_<type> or implicitly through

35.     --  Cairo.Set_Source_<type> subprograms.

36.     --  </description>

37.     --

38.     --  <c_version>1.8.8</c_version>

39.     --  <group>Cairo</group>

41.     with System;

43.     package Cairo.PatternTo API docTo spec is

45.        --------------------------------

46.        -- Pattern creation functions --

47.        --------------------------------

49.        --  Cairo_Pattern_Type is used to describe the type of a given pattern.

50.        --

51.        --  The type of a pattern is determined by the function used to create

52.        --  it. The Cairo.Pattern.Create_Rgb and Cairo.Pattern.Create_Rgba

53.        --  functions create Solid patterns. The remaining

54.        --  Cairo.Pattern.Create_<> functions map to pattern types in obvious

55.        --  ways.

56.        --

57.        --  The pattern type can be queried with Cairo.Pattern.Get_Type

58.        --

59.        --  Most Cairo_Pattern functions can be called with a pattern of any type,

60.        --  (though trying to change the extend or filter for a solid pattern will

61.        --  have no effect). A notable exception is Cairo.Pattern.Add_Color_Stop_Rgb

62.        --  and Cairo.Pattern.Add_Color_Stop_Rgba which must only be called with

63.        --  gradient patterns (either Linear or Radial). Otherwise the pattern will

64.        --  be shutdown and put into an error state.

65.        --

66.        --  New entries may be added in future versions.

67.        --

68.        --  Since: 1.2

69.        type Cairo_Pattern_Type is

70.          (Cairo_Pattern_Type_Solid,

71.           --  The pattern is a solid (uniform) color. It may be opaque or

72.           --  translucent.

74.           Cairo_Pattern_Type_Surface,

75.           --  The pattern is a based on a surface (an image).

77.           Cairo_Pattern_Type_Linear,

78.           --  The pattern is a linear gradient.

80.           Cairo_Pattern_Type_Radial

81.           --  The pattern is a radial gradient.

82.          );

83.        pragma Convention (C, Cairo_Pattern_TypeTo API docTo spec);

85.        --  Cairo_extend is used to describe how pattern color/alpha will be

86.        --  determined for areas "outside" the pattern's natural area, (for

87.        --  example, outside the surface bounds or outside the gradient

88.        --  geometry).

89.        --

90.        --  The default extend mode is CAIRO_EXTEND_NONE for surface patterns

91.        --  and CAIRO_EXTEND_PAD for gradient patterns.

92.        --

93.        --  New entries may be added in future versions.

94.        type Cairo_Extend is

95.          (Cairo_Extend_None,

96.           --  Pixels outside of the source pattern are fully transparent

98.           Cairo_Extend_Repeat,

99.           --  The pattern is tiled by repeating

101.           Cairo_Extend_Reflect,

102.           --  The pattern is tiled by reflecting at the edges (Implemented for

103.           --  surface patterns since 1.6)

105.           Cairo_Extend_Pad

106.           --  Pixels outside of the pattern copy

107.           --  the closest pixel from the source (Since 1.2; but only

108.           --  implemented for surface patterns since 1.6)

109.          );

110.        pragma Convention (C, Cairo_ExtendTo API docTo spec);

112.        --  Cairo_filter is used to indicate what filtering should be

113.        --  applied when reading pixel values from patterns. See

114.        --  Cairo.Pattern.Set_Source for indicating the desired filter to be

115.        --  used with a particular pattern.

116.        type Cairo_Filter is

117.          (Cairo_Filter_Fast,

118.           --  A high-performance filter, with quality similar to

119.           --  Cairo_Filter_Nearest

121.           Cairo_Filter_Good,

122.           --  A reasonable-performance filter, with quality similar to

123.           --  Cairo_Filter_Bilinear

125.           Cairo_Filter_Best,

126.           --  The highest-quality available, performance may

127.           --  not be suitable for interactive use.

129.           Cairo_Filter_Nearest,

130.           --  Nearest-neighbor filtering

132.           Cairo_Filter_Bilinear,

133.           --  Linear interpolation in two dimensions

135.           Cairo_Filter_Gaussian

136.           --  This filter value is currently unimplemented, and should not be used

137.           --  in current code.

138.          );

139.        pragma Convention (C, Cairo_FilterTo API docTo spec);

141.        function Create_RgbTo API docTo body

142.          (Red   : GdoubleTo API docTo spec;

143.           Green : GdoubleTo API docTo spec;

144.           Blue  : GdoubleTo API docTo spec)

145.           return  Cairo_PatternTo API docTo spec;

146.        --  Red:   Red component of the color

147.        --  Green: Green component of the color

148.        --  Blue:  Blue component of the color

149.        --

150.        --  Creates a new Cairo_Pattern corresponding to an opaque color.  The

151.        --  color components are floating point numbers in the range 0 to 1.

152.        --  If the values passed in are outside that range, they will be

153.        --  clamped.

154.        --

155.        --  Return value: the newly created Cairo_Pattern if successful, or

156.        --  an error pattern in case of no memory.  The caller owns the

157.        --  returned object and should call Cairo.Pattern.Destroy when

158.        --  finished with it.

159.        --

160.        --  This function will always return a valid pointer, but if an error

161.        --  occurred the pattern status will be set to an error. To inspect

162.        --  the status of a pattern use Cairo.Pattern.Status.

164.        function Create_RgbaTo API docTo body

165.          (Red   : GdoubleTo API docTo spec;

166.           Green : GdoubleTo API docTo spec;

167.           Blue  : GdoubleTo API docTo spec;

168.           Alpha : GdoubleTo API docTo spec)

169.           return  Cairo_PatternTo API docTo spec;

170.        --  Red: Red component of the color

171.        --  Green: Green component of the color

172.        --  Blue: Blue component of the color

173.        --  Alpha: Alpha component of the color

174.        --

175.        --  Creates a new Cairo_Pattern corresponding to a translucent color.

176.        --  The color components are floating point numbers in the range 0 to

177.        --  1.  If the values passed in are outside that range, they will be

178.        --  clamped.

179.        --

180.        --  Return value: the newly created Cairo_Pattern if successful, or

181.        --  an error pattern in case of no memory.  The caller owns the

182.        --  returned object and should call Cairo.Pattern.Destroy when

183.        --  finished with it.

184.        --

185.        --  This function will always return a valid pointer, but if an error

186.        --  occurred the pattern status will be set to an error. To inspect

187.        --  the status of a pattern use Cairo.Pattern.Status.

189.        function Create_For_SurfaceTo API docTo body

190.          (Surface : Cairo_SurfaceTo API docTo spec)

191.           return    Cairo_PatternTo API docTo spec;

192.        --  Surface: the Surface

193.        --

194.        --  Create a new Cairo_Pattern for the given surface.

195.        --

196.        --  Return value: the newly created Cairo_Pattern if successful, or

197.        --  an error pattern in case of no memory.  The caller owns the

198.        --  returned object and should call Cairo.Pattern.Destroy when

199.        --  finished with it.

200.        --

201.        --  This function will always return a valid pointer, but if an error

202.        --  occurred the pattern status will be set to an error. To inspect

203.        --  the status of a pattern use Cairo.Pattern.Status.

205.        function Create_LinearTo API docTo body

206.          (X0   : GdoubleTo API docTo spec;

207.           Y0   : GdoubleTo API docTo spec;

208.           X1   : GdoubleTo API docTo spec;

209.           Y1   : GdoubleTo API docTo spec)

210.           return Cairo_PatternTo API docTo spec;

211.        --  X0: x coordinate of the start point

212.        --  Y0: y coordinate of the start point

213.        --  X1: x coordinate of the end point

214.        --  Y1: y coordinate of the end point

215.        --

216.        --  Create a new linear gradient Cairo_Pattern along the line defined

217.        --  by (X0, Y0) and (X1, Y1).  Before using the gradient pattern, a

218.        --  number of color stops should be defined using

219.        --  Cairo.Pattern.Add_Color_Stop_Rgb or

220.        --  Cairo.Pattern.Add_Color_Stop_Rgba.

221.        --

222.        --  Note: The coordinates here are in pattern space. For a new pattern,

223.        --  pattern space is identical to user space, but the relationship

224.        --  between the spaces can be changed with Cairo.Pattern.Set_Matrix.

225.        --

226.        --  Return value: the newly created Cairo_Pattern if successful, or

227.        --  an error pattern in case of no memory.  The caller owns the

228.        --  returned object and should call Cairo.Pattern.Destroy when

229.        --  finished with it.

230.        --

231.        --  This function will always return a valid pointer, but if an error

232.        --  occurred the pattern status will be set to an error.  To inspect

233.        --  the status of a pattern use Cairo.Pattern.Status.

235.        function Create_RadialTo API docTo body

236.          (Cx0     : GdoubleTo API docTo spec;

237.           Cy0     : GdoubleTo API docTo spec;

238.           Radius0 : GdoubleTo API docTo spec;

239.           Cx1     : GdoubleTo API docTo spec;

240.           Cy1     : GdoubleTo API docTo spec;

241.           Radius1 : GdoubleTo API docTo spec)

242.           return    Cairo_PatternTo API docTo spec;

243.        --  Cx0: X coordinate for the center of the start circle

244.        --  Cy0: Y coordinate for the center of the start circle

245.        --  Radius0: radius of the start circle

246.        --  Cx1: X coordinate for the center of the end circle

247.        --  Cy1: Y coordinate for the center of the end circle

248.        --  Radius1: radius of the end circle

249.        --

250.        --  Creates a new radial gradient Cairo_Pattern between the two circles

251.        --  defined by (Cx0, Cy0, Radius0) and (Cx1, Cy1, Radius1). Before using the

252.        --  gradient pattern, a number of color stops should be defined using

253.        --  Cairo.Pattern.Add_Color_Stop_Rgb or Cairo.Pattern.Add_Color_Stop_Rgba.

254.        --

255.        --  Note: The coordinates here are in pattern space. For a new pattern,

256.        --  pattern space is identical to user space, but the relationship

257.        --  between the spaces can be changed with Cairo.Pattern.Set_Matrix.

258.        --

259.        --  Return value: the newly created Cairo_Pattern if successful, or

260.        --  an error pattern in case of no memory.  The caller owns the

261.        --  returned object and should call Cairo.Pattern.Destroy when

262.        --  finished with it.

263.        --

264.        --  This function will always return a valid pointer, but if an error

265.        --  occurred the pattern status will be set to an error.  To inspect

266.        --  the status of a pattern use Cairo.Pattern.Status.

268.        function ReferenceTo API docTo body (Pattern : Cairo_PatternTo API docTo spec) return Cairo_PatternTo API docTo spec;

269.        --  Pattern: a Cairo_Pattern

270.        --

271.        --  Increases the reference count on pattern by one. This prevents

272.        --  pattern from being destroyed until a matching call to

273.        --  Cairo.Pattern.Destroy is made.

274.        --

275.        --  The number of references to a Cairo_Pattern can be get using

276.        --  Cairo.Pattern.Get_Reference_Count.

277.        --

278.        --  Return value: the referenced Cairo_Pattern.

280.        procedure DestroyTo API docTo body (Pattern : Cairo_PatternTo API docTo spec);

281.        --  Pattern: a Cairo_Pattern

282.        --

283.        --  Decreases the reference count on pattern by one. If the result is

284.        --  zero, then pattern and all associated resources are freed.  See

285.        --  Cairo.Pattern.Reference.

287.        function Get_Reference_CountTo API docTo body (Pattern : Cairo_PatternTo API docTo spec) return GuintTo API docTo spec;

288.        --  Pattern: a Cairo_Pattern

289.        --

290.        --  Returns the current reference count of pattern.

291.        --

292.        --  Return value: the current reference count of pattern.  If the

293.        --  object is a nil object, 0 will be returned.

294.        --

295.        --  Since: 1.4

297.        function StatusTo API docTo body (Pattern : Cairo_PatternTo API docTo spec) return Cairo_StatusTo API docTo spec;

298.        --  Pattern: a Cairo_Pattern

299.        --

300.        --  Checks whether an error has previously occurred for this

301.        --  pattern.

302.        --

303.        --  Return value: Cairo_Status_Success, Cairo_Status_No_Memory, or

304.        --  Cairo_Status_Pattern_Type_Mismatch.

306.        function Get_User_DataTo API docTo body

307.          (Pattern : Cairo_PatternTo API docTo spec;

308.           Key     : access Cairo_User_Data_KeyTo API docTo spec) return System.Address;

309.        --  Pattern: a Cairo_Pattern

310.        --  Key: the address of the Cairo_User_Data_Key the user data was

311.        --  attached to

312.        --

313.        --  Return user data previously attached to pattern using the

314.        --  specified key.  If no user data has been attached with the given

315.        --  key this function returns System.Null_Address.

316.        --

317.        --  Return value: the user data previously attached or System.Null_Address.

318.        --

319.        --  Since: 1.4

321.        function Set_User_DataTo API docTo body

322.          (Pattern   : Cairo_PatternTo API docTo spec;

323.           Key       : access Cairo_User_Data_KeyTo API docTo spec;

324.           User_Data : System.Address;

325.           Destroy   : Cairo_Destroy_FuncTo API docTo spec) return Cairo_StatusTo API docTo spec;

326.        --  Pattern: a Cairo_Pattern

327.        --  Key: the address of a Cairo_User_Data_Key to attach the user data to

328.        --  User_Data: the user data to attach to the Cairo_Pattern

329.        --  Destroy: a Cairo_Destroy_Func which will be called when the

330.        --  Cairo_Context is destroyed or when new user data is attached using the

331.        --  same key.

332.        --

333.        --  Attach user data to pattern.  To remove user data from a surface,

334.        --  call this function with the key that was used to set it and Null_Address

335.        --  for data.

336.        --

337.        --  Return value: Cairo_Status_Success or Cairo_Status_No_Memory if a

338.        --  slot could not be allocated for the user data.

339.        --

340.        --  Since: 1.4

342.        function Get_TypeTo API docTo body (Pattern : Cairo_PatternTo API docTo spec) return Cairo_Pattern_TypeTo API docTo spec;

343.        --  Pattern: a Cairo_Pattern

344.        --

345.        --  This function returns the type a pattern.

346.        --  See Cairo_Pattern_Type for available types.

347.        --

348.        --  Return value: The type of pattern.

349.        --

350.        --  Since: 1.2

352.        procedure Add_Color_Stop_RgbTo API docTo body

353.          (Pattern : Cairo_PatternTo API docTo spec;

354.           Offset  : GdoubleTo API docTo spec;

355.           Red     : GdoubleTo API docTo spec;

356.           Green   : GdoubleTo API docTo spec;

357.           Blue    : GdoubleTo API docTo spec);

358.        --  Pattern: a Cairo_Pattern

359.        --  Offset: an Offset in the range [0.0 .. 1.0]

360.        --  Red: Red component of color

361.        --  Green: Green component of color

362.        --  Blue: Blue component of color

363.        --

364.        --  Adds an opaque color stop to a gradient pattern. The offset

365.        --  specifies the location along the gradient's control vector. For

366.        --  example, a linear gradient's control vector is from (X0,Y0) to

367.        --  (X1,Y1) while a radial gradient's control vector is from any point

368.        --  on the start circle to the corresponding point on the end circle.

369.        --

370.        --  The color is specified in the same way as in Cairo.Set_Source_Rgb.

371.        --

372.        --  If two (or more) stops are specified with identical offset values,

373.        --  they will be sorted according to the order in which the stops are

374.        --  added, (stops added earlier will compare less than stops added

375.        --  later). This can be useful for reliably making sharp color

376.        --  transitions instead of the typical blend.

377.        --

378.        --

379.        --  Note: If the pattern is not a gradient pattern, (eg. a linear or

380.        --  radial pattern), then the pattern will be put into an error status

381.        --  with a status of Cairo_Status_Pattern_Type_Mismatch.

383.        procedure Add_Color_Stop_RgbaTo API docTo body

384.          (Pattern : Cairo_PatternTo API docTo spec;

385.           Offset  : GdoubleTo API docTo spec;

386.           Red     : GdoubleTo API docTo spec;

387.           Green   : GdoubleTo API docTo spec;

388.           Blue    : GdoubleTo API docTo spec;

389.           Alpha   : GdoubleTo API docTo spec);

390.        --  Pattern: a Cairo_Pattern

391.        --  Offset: an Offset in the range [0.0 .. 1.0]

392.        --  Red: Red component of color

393.        --  Green: Green component of color

394.        --  Blue: Blue component of color

395.        --  Alpha: Alpha component of color

396.        --

397.        --  Adds a translucent color stop to a gradient pattern. The offset

398.        --  specifies the location along the gradient's control vector. For

399.        --  example, a linear gradient's control vector is from (x0,y0) to

400.        --  (x1,y1) while a radial gradient's control vector is from any point

401.        --  on the start circle to the corresponding point on the end circle.

402.        --

403.        --  The color is specified in the same way as in Cairo_Set_Source_Rgba.

404.        --

405.        --  If two (or more) stops are specified with identical offset values,

406.        --  they will be sorted according to the order in which the stops are

407.        --  added, (stops added earlier will compare less than stops added

408.        --  later). This can be useful for reliably making sharp color

409.        --  transitions instead of the typical blend.

410.        --

411.        --  Note: If the pattern is not a gradient pattern, (eg. a linear or

412.        --  radial pattern), then the pattern will be put into an error status

413.        --  with a status of Cairo_Status_Pattern_Type_Mismatch.

415.        procedure Set_MatrixTo API docTo body

416.          (Pattern : Cairo_PatternTo API docTo spec;

417.           Matrix  : access Cairo_MatrixTo API docTo spec);

418.        --  Pattern: a Cairo_Pattern

419.        --  Matrix: a Cairo_Matrix

420.        --

421.        --  Sets the pattern's transformation matrix to matrix. This matrix is

422.        --  a transformation from user space to pattern space.

423.        --

424.        --  When a pattern is first created it always has the identity matrix

425.        --  for its transformation matrix, which means that pattern space is

426.        --  initially identical to user space.

427.        --

428.        --  Important: Please note that the direction of this transformation

429.        --  matrix is from user space to pattern space. This means that if you

430.        --  imagine the flow from a pattern to user space (and on to device

431.        --  space), then coordinates in that flow will be transformed by the

432.        --  inverse of the pattern matrix.

433.        --

434.        --  For example, if you want to make a pattern appear twice as large as

435.        --  it does by default the correct code to use is:

436.        --

437.        --  Cairo.Matrix.Init_Scale (Matrix, 0.5, 0.5);

438.        --  Cairo.Pattern.Set_Matrix (Pattern, Matrix);

439.        --

440.        --  Meanwhile, using values of 2.0 rather than 0.5 in the code above

441.        --  would cause the pattern to appear at half of its default size.

442.        --

443.        --  Also, please note the discussion of the user-space locking

444.        --  semantics of Cairo_Set_Source.

446.        procedure Get_MatrixTo API docTo body

447.          (Pattern : Cairo_PatternTo API docTo spec;

448.           Matrix  : access Cairo_MatrixTo API docTo spec);

449.        --  Pattern: a Cairo_Pattern

450.        --  Matrix: return value for the Matrix

451.        --

452.        --  Stores the pattern's transformation matrix into matrix.

454.        procedure Set_ExtendTo API docTo body (Pattern : Cairo_PatternTo API docTo spec; Extend : Cairo_ExtendTo API docTo spec);

455.        --  Pattern: a Cairo_Pattern

456.        --  Extend: a Cairo_Extend describing how the area outside of the

457.        --  pattern will be drawn

458.        --

459.        --  Sets the mode to be used for drawing outside the area of a pattern.

460.        --  See Cairo_Extend for details on the semantics of each extend

461.        --  strategy.

462.        --

463.        --  The default extend mode is Cairo_Extend_None for surface patterns

464.        --  and Cairo_Extend_PAd for gradient patterns.

466.        function Get_ExtendTo API docTo body (Pattern : Cairo_PatternTo API docTo spec) return Cairo_ExtendTo API docTo spec;

467.        --  Pattern: a Cairo_Pattern

468.        --

469.        --  Gets the current extend mode for a pattern.  See Cairo_Extend

470.        --  for details on the semantics of each extend strategy.

471.        --

472.        --  Return value: the current extend strategy used for drawing the

473.        --  pattern.

475.        procedure Set_FilterTo API docTo body (Pattern : Cairo_PatternTo API docTo spec; Filter : Cairo_FilterTo API docTo spec);

476.        --  Pattern: a Cairo_Pattern

477.        --  Filter: a Cairo_Filter describing the Filter to use for resizing

478.        --  the pattern

479.        --

480.        --  Sets the filter to be used for resizing when using this pattern.

481.        --  See Cairo_Filter for details on each filter.

482.        --

483.        --  Note that you might want to control filtering even when you do not

484.        --  have an explicit Cairo_Pattern object, (for example when using

485.        --  Cairo_Set_Source_Surface). In these cases, it is convenient to

486.        --  use Cairo_Get_Source to get access to the pattern that cairo

487.        --  creates implicitly. For example:

488.        --

489.        --  Cairo_Set_Source_Surface (Cr, Image, X, Y);

490.        --  Cairo.Pattern.Set_Filter (Cairo_Get_Source (Cr), Cairo_Filter_Nearest);

492.        function Get_FilterTo API docTo body (Pattern : Cairo_PatternTo API docTo spec) return Cairo_FilterTo API docTo spec;

493.        --  Pattern: a Cairo_Pattern

494.        --

495.        --  Gets the current filter for a pattern.  See Cairo_Filter

496.        --  for details on each filter.

497.        --

498.        --  Return value: the current filter used for resizing the pattern.

500.        function Get_RgbaTo API docTo body

501.          (Pattern : Cairo_PatternTo API docTo spec;

502.           Red     : access GdoubleTo API docTo spec;

503.           Green   : access GdoubleTo API docTo spec;

504.           Blue    : access GdoubleTo API docTo spec;

505.           Alpha   : access GdoubleTo API docTo spec)

506.           return    Cairo_StatusTo API docTo spec;

507.        --  Pattern: a Cairo_Pattern

508.        --  Red: return value for Red component of color, or null

509.        --  Green: return value for Green component of color, or null

510.        --  Blue: return value for Blue component of color, or null

511.        --  Alpha: return value for Alpha component of color, or null

512.        --

513.        --  Gets the solid color for a solid color pattern.

514.        --

515.        --  Return value: Cairo_Status_Success, or

516.        --  Cairo_Status_Pattern_Type_Mismatch if the pattern is not a solid

517.        --  color pattern.

518.        --

519.        --  Since: 1.4

521.        function Get_SurfaceTo API docTo body

522.          (Pattern : Cairo_PatternTo API docTo spec;

523.           Surface : Cairo_SurfaceTo API docTo spec)

524.           return    Cairo_StatusTo API docTo spec;

525.        --  Pattern: a Cairo_Pattern

526.        --  Surface: return value for Surface of pattern, or null

527.        --

528.        --  Gets the surface of a surface pattern.  The reference returned in

529.        --  surface is owned by the pattern; the caller should call

530.        --  Cairo.Surface.Reference if the surface is to be retained.

531.        --

532.        --  Return value: Cairo_Status_Success, or

533.        --  Cairo_Status_Pattern_Type_Mismatch if the pattern is not a surface

534.        --  pattern.

535.        --

536.        --  Since: 1.4

538.        function Get_Color_Stop_RgbaTo API docTo body

539.          (Pattern : Cairo_PatternTo API docTo spec;

540.           Index   : GintTo API docTo spec;

541.           Offset  : access GdoubleTo API docTo spec;

542.           Red     : access GdoubleTo API docTo spec;

543.           Green   : access GdoubleTo API docTo spec;

544.           Blue    : access GdoubleTo API docTo spec;

545.           Alpha   : access GdoubleTo API docTo spec)

546.           return    Cairo_StatusTo API docTo spec;

547.        --  Pattern: a Cairo_Pattern

548.        --  Index: Index of the stop to return data for

549.        --  Offset: return value for the Offset of the stop, or null

550.        --  Red: return value for Red component of color, or null

551.        --  Green: return value for Green component of color, or null

552.        --  Blue: return value for Blue component of color, or null

553.        --  Alpha: return value for Alpha component of color, or null

554.        --

555.        --  Gets the color and offset information at the given index for a

556.        --  gradient pattern.  Values of index are 0 to 1 less than the number

557.        --  returned by Cairo.Pattern.Get_Color_Stop_Count.

558.        --

559.        --  Return value: Cairo_Status_Success, or Cairo_Status_Invalid_Index

560.        --  if index is not valid for the given pattern.  If the pattern is

561.        --  not a gradient pattern, Cairo_Status_Pattern_Type_Mismatch is

562.        --  returned.

563.        --

564.        --  Since: 1.4

566.        function Get_Color_Stop_CountTo API docTo body

567.          (Pattern : Cairo_PatternTo API docTo spec;

568.           Count   : access GintTo API docTo spec)

569.           return    Cairo_StatusTo API docTo spec;

570.        --  Pattern: a Cairo_Pattern

571.        --  Count: return value for the number of color stops, or NULL

572.        --

573.        --  Gets the number of color stops specified in the given gradient

574.        --  pattern.

575.        --

576.        --  Return value: Cairo_Status_Success, or

577.        --  Cairo_Status_Pattern_Type_Mismatch if pattern is not a gradient

578.        --  pattern.

579.        --

580.        --  Since: 1.4

582.        function Get_Linear_PointsTo API docTo body

583.          (Pattern : Cairo_PatternTo API docTo spec;

584.           X0      : access GdoubleTo API docTo spec;

585.           Y0      : access GdoubleTo API docTo spec;

586.           X1      : access GdoubleTo API docTo spec;

587.           Y1      : access GdoubleTo API docTo spec)

588.           return    Cairo_StatusTo API docTo spec;

589.        --  Pattern: a Cairo_Pattern

590.        --  X0: return value for the x coordinate of the first point, or null

591.        --  Y0: return value for the y coordinate of the first point, or null

592.        --  X1: return value for the x coordinate of the second point, or null

593.        --  Y1: return value for the y coordinate of the second point, or null

594.        --

595.        --  Gets the gradient endpoints for a linear gradient.

596.        --

597.        --  Return value: Cairo_Status_Success, or

598.        --  Cairo_Status_Pattern_Type_Mismatch if pattern is not a linear

599.        --  gradient pattern.

600.        --

601.        --  Since: 1.4

603.        function Get_Radial_CirclesTo API docTo body

604.          (Pattern : Cairo_PatternTo API docTo spec;

605.           X0      : access GdoubleTo API docTo spec;

606.           Y0      : access GdoubleTo API docTo spec;

607.           R0      : access GdoubleTo API docTo spec;

608.           X1      : access GdoubleTo API docTo spec;

609.           Y1      : access GdoubleTo API docTo spec;

610.           R1      : access GdoubleTo API docTo spec)

611.           return    Cairo_StatusTo API docTo spec;

612.        --  Pattern: a Cairo_Pattern

613.        --  X0: return value for the x coordinate of the center of the first

614.        --  circle, or null

615.        --  Y0: return value for the y coordinate of the center of the first

616.        --  circle, or null

617.        --  R0: return value for the radius of the first circle, or null

618.        --  X1: return value for the x coordinate of the center of the second

619.        --  circle, or null

620.        --  Y1: return value for the y coordinate of the center of the second

621.        --  circle, or null

622.        --  R1: return value for the radius of the second circle, or null

623.        --

624.        --  Gets the gradient endpoint circles for a radial gradient, each

625.        --  specified as a center coordinate and a radius.

626.        --

627.        --  Return value: Cairo_Status_Success, or

628.        --  Cairo_Status_Pattern_Type_Mismatch if pattern is not a radial

629.        --  gradient pattern.

630.        --

631.        --  Since: 1.4

633.     private

635.        pragma Import (C, Create_RgbTo API docTo spec, "cairo_pattern_create_rgb");

636.        pragma Import (C, Create_RgbaTo API docTo spec, "cairo_pattern_create_rgba");

637.        pragma Import (C, Create_For_SurfaceTo API docTo spec, "cairo_pattern_create_for_surface");

638.        pragma Import (C, Create_LinearTo API docTo spec, "cairo_pattern_create_linear");

639.        pragma Import (C, Create_RadialTo API docTo spec, "cairo_pattern_create_radial");

640.        pragma Import (C, ReferenceTo API docTo spec, "cairo_pattern_reference");

641.        pragma Import (C, DestroyTo API docTo spec, "cairo_pattern_destroy");

642.        pragma Import

643.          (C,

644.           Get_Reference_CountTo API docTo spec,

645.           "cairo_pattern_get_reference_count");

646.        pragma Import (C, StatusTo API docTo spec, "cairo_pattern_status");

647.        pragma Import (C, Get_User_DataTo API docTo spec, "cairo_pattern_get_user_data");

648.        pragma Import (C, Set_User_DataTo API docTo spec, "cairo_pattern_set_user_data");

649.        pragma Import (C, Get_TypeTo API docTo spec, "cairo_pattern_get_type");

650.        pragma Import (C, Add_Color_Stop_RgbTo API docTo spec, "cairo_pattern_add_color_stop_rgb");

651.        pragma Import

652.          (C,

653.           Add_Color_Stop_RgbaTo API docTo spec,

654.           "cairo_pattern_add_color_stop_rgba");

655.        pragma Import (C, Set_MatrixTo API docTo spec, "cairo_pattern_set_matrix");

656.        pragma Import (C, Get_MatrixTo API docTo spec, "cairo_pattern_get_matrix");

657.        pragma Import (C, Set_ExtendTo API docTo spec, "cairo_pattern_set_extend");

658.        pragma Import (C, Get_ExtendTo API docTo spec, "cairo_pattern_get_extend");

659.        pragma Import (C, Set_FilterTo API docTo spec, "cairo_pattern_set_filter");

660.        pragma Import (C, Get_FilterTo API docTo spec, "cairo_pattern_get_filter");

661.        pragma Import (C, Get_RgbaTo API docTo spec, "cairo_pattern_get_rgba");

662.        pragma Import (C, Get_SurfaceTo API docTo spec, "cairo_pattern_get_surface");

663.        pragma Import

664.          (C,

665.           Get_Color_Stop_RgbaTo API docTo spec,

666.           "cairo_pattern_get_color_stop_rgba");

667.        pragma Import

668.          (C,

669.           Get_Color_Stop_CountTo API docTo spec,

670.           "cairo_pattern_get_color_stop_count");

671.        pragma Import (C, Get_Linear_PointsTo API docTo spec, "cairo_pattern_get_linear_points");

672.        pragma Import (C, Get_Radial_CirclesTo API docTo spec, "cairo_pattern_get_radial_circles");

674.     end Cairo.PatternTo API docTo spec;