Skip to main content
Ctrl+K
PETSc v3.25.5-968-g5b51e5f1332b documentation - Home
  • Overview
  • Install
  • Tutorials
  • User-Guide
  • C/Fortran API
  • petsc4py API
  • FAQ
  • Community
  • Developers
  • Misc.
  • GitLab
  • Overview
  • Install
  • Tutorials
  • User-Guide
  • C/Fortran API
  • petsc4py API
  • FAQ
  • Community
  • Developers
  • Misc.
  • GitLab
  • PetscDrawLine

PetscDrawLine#

draws a line onto a drawable.

Synopsis#

#include "petscdraw.h" 
PetscErrorCode PetscDrawLine(PetscDraw draw, PetscReal xl, PetscReal yl, PetscReal xr, PetscReal yr, int cl)

Not Collective

Input Parameters#

  • draw - the drawing context

  • xl - horizontal coordinate of first end point

  • yl - vertical coordinate of first end point

  • xr - horizontal coordinate of second end point

  • yr - vertical coordinate of second end point

  • cl - the colors of the endpoints

See Also#

PetscDraw, PetscDrawArrow(), PetscDrawLineSetWidth(), PetscDrawLineGetWidth(), PetscDrawRectangle(), PetscDrawTriangle(), PetscDrawEllipse(), PetscDrawMarker(), PetscDrawPoint()

Level#

beginner

Location#

src/sys/classes/draw/interface/dline.c

Examples#

src/sys/classes/draw/tests/ex1.c
src/sys/classes/draw/tests/ex10.c
src/sys/classes/draw/tests/ex2.c
src/sys/classes/draw/tests/ex4.c
src/sys/classes/draw/tests/ex4f.F90
src/sys/classes/draw/tests/ex7.c

Implementations#

PetscDrawLine_Image() in src/sys/classes/draw/impls/image/drawimage.c
PetscDrawLine_Null() in src/sys/classes/draw/impls/null/drawnull.c
PetscDrawLine_TikZ() in src/sys/classes/draw/impls/tikz/tikz.c
PetscDrawLine_Win32() in src/sys/classes/draw/impls/win32/win32draw.c
PetscDrawLine_X() in src/sys/classes/draw/impls/x/xops.c


Index of all Draw routines
Table of Contents for all manual pages
Index of all manual pages

On this page
  • Synopsis
  • Input Parameters
  • See Also
  • Level
  • Location
  • Examples
  • Implementations
Edit on GitLab
Show Source

© Copyright 1991-2026, UChicago Argonne, LLC and the PETSc Development Team.

Created using Sphinx 7.3.7.

Built with the PyData Sphinx Theme 0.15.1.

Last updated on 2026-09-19T03:38:49-0500 (v3.25.5-968-g5b51e5f1332b).