wolfhece.wolf_texture

Author: HECE - University of Liege, Pierre Archambeau Date: 2024

Copyright (c) 2024 University of Liege. All rights reserved.

This script and its content are protected by copyright law. Unauthorized copying or distribution of this file, via any medium, is strictly prohibited.

Module Contents

wolfhece.wolf_texture.msg[source]
class wolfhece.wolf_texture.genericImagetexture(which: str, label: str, mapviewer, xmin: float, xmax: float, ymin: float, ymax: float, imageFile: str = '', imageObj=None, transparent_color=None, tolerance: int = 3, replace_color=None, drawing_scale: float = 1.0, offset: list[float, float] = [0.0, 0.0])[source]

Bases: wolfhece.drawing_obj.Element_To_Draw

Inheritance diagram of wolfhece.wolf_texture.genericImagetexture

Affichage d’une image en OpenGL via une texture

name: str[source]
idtexture: int[source]
width: int[source]
height: int[source]
which: str[source]
myImage: PIL.Image[source]
time = None[source]
xmin[source]
xmax[source]
ymin[source]
ymax[source]
idx[source]
imageFile = ''[source]
drawing_scale = 1.0[source]
offset = [0.0, 0.0][source]
oldview[source]
unload()[source]

Unload the texture from memory

load(imageFile='')[source]

Load the image texture into OpenGL

Parameters:

imageFile – Optional file path to load the image from

update_minmax()[source]

Update the spatial extent of the texture based on its size

reload(xmin=-99999, xmax=-99999, ymin=-99999, ymax=-99999)[source]
plot(sx=None, sy=None, xmin=None, ymin=None, xmax=None, ymax=None, size=None)[source]

alias for paint

find_minmax(update=False)[source]

Generic function to find min and max spatial extent in data

uv(x: float, y: float) tuple[float, float][source]

Convert coordinates to texture coordinates taking into account the texture’s spatial extent, the scaleing factor, and the offset.

Parameters:
  • x – X coordinate in pixels

  • y – Y coordinate in pixels

Returns:

Tuple of (u, v) texture coordinates

paint()[source]

Paint the image texture on the OpenGL canvas

class wolfhece.wolf_texture.imagetexture(which: str, label: str, cat: str, subc: str, mapviewer, xmin: float, xmax: float, ymin: float, ymax: float, width: int = 1000, height: int = 1000, France: bool = False, epsg='31370', Vlaanderen: bool = False, LifeWatch: bool = False, IGN_Belgium: bool = False, IGN_Cartoweb: bool = False, postFlood2021: bool = False, Alaro: bool = False)[source]

Bases: wolfhece.drawing_obj.Element_To_Draw

Inheritance diagram of wolfhece.wolf_texture.imagetexture

Affichage d’une image, obtenue depuis un Web service, en OpenGL via une texture

name: str[source]
idtexture: int[source]
width: int[source]
height: int[source]
which: str[source]
category: str[source]
subcategory: str[source]
France: bool[source]
epsg: str[source]
Vlaanderen = False[source]
LifeWatch = False[source]
IGN_Belgium = False[source]
IGN_Cartoweb = False[source]
postFlood2021 = False[source]
Alaro = False[source]
xmin[source]
xmax[source]
ymin[source]
ymax[source]
idx[source]
time = None[source]
alpha = 1.0[source]
force_alpha = False[source]
oldview[source]
load()[source]
reload()[source]
plot(sx=None, sy=None, xmin=None, ymin=None, xmax=None, ymax=None, size=None)[source]

alias for paint

find_minmax(update=False)[source]

Generic function to find min and max spatial extent in data

paint()[source]
check_plot()[source]

Generic function responding to check operation from mapviewer

uncheck_plot(unload=True)[source]

Generic function responding to uncheck operation from mapviewer

class wolfhece.wolf_texture.Text_Image_Texture(text: str, mapviewer, proptext: wolfhece.textpillow.Text_Infos, vector, x: float, y: float)[source]

Bases: genericImagetexture

Inheritance diagram of wolfhece.wolf_texture.Text_Image_Texture

Affichage d’une image en OpenGL via une texture

x[source]
y[source]
vector[source]
proptext[source]
mapviewer[source]
oldview[source]
findscale()[source]
load(imageFile='')[source]

Load the image texture into OpenGL

Parameters:

imageFile – Optional file path to load the image from

paint()[source]

Paint the image texture on the OpenGL canvas

update_image(newtext: str = '', proptext: wolfhece.textpillow.Text_Infos = None)[source]