@Phuket2 As I mentioned in other forum post I have added the example file position_img_shape_in_custom_view.py in textlayout repository.
https://github.com/balachandrana/textlayout.
You can do a git pull if you have already got this.
It is not just limited to pyui. We could use it in custom views for placement of various shapes and images. May be I will post an example later.
This example illustrates using placement of images and shapes in custom view using textlayout module. The textlayout module is generic enough to use in other types of applications. Here is the portion of code illustrating the layout of images and shapes.
Only one image or shape (element) is shown at a time and you can do a tap to change the current element.
layout_text = '''
********
i--*****
|--*****
**s--***
********
****s--*
********
********
'''
ui_element_map = {
'i': ('image', Img),
's': ('shape', Shape)
}