module: ‘draw.py’

class gwa.code.draw.Draw(id_camp, file='temp.png', resolution=50, main=None)[source]

Graphical representation of measurement campaign

Argument :
  • Id_campagne (integer)

    Choice of the campaign on which the drawing will be done

  • File (type string)

    Selecting the file name that will be created

Parameters:

optional

  • Resolution (integer)

    Choosing the resolution of the draw file

Example

>>> id_campaign = 52
>>> File = 'test.png'
draw.Draw (id_campaign 'test.png')
circleDrawing(coordinates, color_rgb)[source]

drawing circle

Arguments :
coordinates (type tuple)

coordinates (x,y)

color_rgb (type tuple)

form: (red,green,blue). Colors values between 0.0 and 1.0

example

>>> coordinates = (2,1)
>>> color_rgb = (1,0,1)
draw.Draw().circleDrawing(coordinates,color_rgb)
crossDrawing(coordinates)[source]

Drawing cross for next measure

Argument :
coordinates (type tuple)

Coordinates choice

example

>>> coordinates (3,1)
draw.Drawing().crossDrawing(coordinates)
getmatrix()[source]

get matrix

Returns:Return matrix (2 dimension)

example

>>>
draw.Draw().getmatrix()
updateDrawing(coorX, coorC='', color=True)[source]
Update drawing file representing movement

Cross = position Cicle = old position

Values = green circle Ignored values = red circle

Argument :
  • CoorX (type tuple)

    Tuple representing cross coordinates

  • CoorC (type tuple)

    Tuple representing circle coordinates

  • color (boolean)

    True => green circle, False => red circle

example

>>> CoorX = (2.0)
draw.Draw().UpdateDrawing (coorX)

Previous topic

module: ‘extract.py’

Next topic

module: ‘popups.py’

This Page