More challenging Questions

Im’ revealing myself a bit more, I’m a user of the very old Esri Mapobjects ActiveX. After 18 years of loyal and good services, i’m intending to change it and looking of another solution. And I’m discovering MapWinGis, that’s wonderful, it can do everything that I’m expecting. My first question is about labelplacer.
In my old project we use a lot of labelplacer (Mo20.ocx)

as you can see on the image on the same layer we’re able to display name with a good orientation and font size to fit perfectly the shape(ship).

Do you think it’s possible to have the same or something approaching ?

And it’s really fun to you GIS capabilites in a marina software. Imagine about 50 different layers over and under water.

My second question it’s was about wpf because we’re intend to use wapwingis with core.Net and we’re wondering about it?

The following code of boatname with mapobject
Dim Layer As MapLayer
Set Layer = Map1.Layers(sCouche)

If Layer Is Nothing Then Exit Sub

Dim pGroupRend As MapObjects2.GroupRenderer
Set pGroupRend = Layer.Renderer

If pGroupRend.Count > 1 Then
    Exit Sub
End If

Dim LabelPlacer As New MapObjects2.LabelRenderer
Layer.Symbol.color = moYellow

' create a font to be used by the LabelPlacer
Dim fnt As New stdole.StdFont
If sCouche = COUCHE_SYMBOLES Then
    fnt.Name = "EAS Seaport"
Else
    fnt.Name = FONT_GRAPHIQUE
End If
fnt.Bold = True
'    fnt.Size = fnt.Size / 1.5
LabelPlacer.SymbolCount = 1
LabelPlacer.Symbol(0).color = color
LabelPlacer.Symbol(0).Font = fnt
LabelPlacer.Symbol(0).HorizontalAlignment = moAlignCenter
LabelPlacer.Symbol(0).VerticalAlignment = moAlignCenter
LabelPlacer.Symbol(0).ROTATION = 0
'    LabelPlacer.Symbol(0).Fitted = True
LabelPlacer.field = coltext

Layer.Renderer.Add LabelPlacer

the following code for berth name
Dim Layer As MapLayer
Set Layer = Map1.Layers(COUCHE_POSTES)

If Layer Is Nothing Then Exit Sub

Dim pGroupRend As MapObjects2.GroupRenderer
Set pGroupRend = Layer.Renderer

If bVisible = False Then
    Layer.RemoveRelates
    If Not pGroupRend Is Nothing Then
        While pGroupRend.Count > 1
            pGroupRend.Remove (1)
        Wend
    End If
    Exit Sub
End If

If pGroupRend.Count > 1 Then
    Exit Sub
End If

Dim LabelPlacer As New MapObjects2.LabelRenderer

Layer.Symbol.color = moYellow

' create a font to be used by the LabelPlacer
Dim fnt As New stdole.StdFont
fnt.Name = FONT_GRAPHIQUE
fnt.Bold = True

LabelPlacer.DrawBackground = True
LabelPlacer.SymbolCount = 3
LabelPlacer.Symbol(0).color = m_GlobalClass.UserParams.ForeColor(COLOR_POSTE_NOM)
LabelPlacer.Symbol(0).Font = fnt
LabelPlacer.Symbol(0).HorizontalAlignment = moAlignCenter
LabelPlacer.Symbol(0).VerticalAlignment = moAlignTop

LabelPlacer.Symbol(1).color = m_GlobalClass.UserParams.ForeColor(COLOR_POSTE_NOM)
LabelPlacer.Symbol(1).Font = fnt
LabelPlacer.Symbol(1).HorizontalAlignment = moAlignCenter
LabelPlacer.Symbol(1).VerticalAlignment = moAlignBottom

LabelPlacer.Symbol(2).color = m_GlobalClass.UserParams.ForeColor(COLOR_POSTE_NOM)
LabelPlacer.Symbol(2).Font = fnt
LabelPlacer.Symbol(2).HorizontalAlignment = moAlignCenter
LabelPlacer.Symbol(2).VerticalAlignment = moAlignBaseline

LabelPlacer.field = SHP_COL_LABEL
LabelPlacer.SymbolField = SHP_COL_ALIGN
LabelPlacer.RotationField = SHP_COL_ANGLE
LabelPlacer.HeightField = SHP_COL_SIZE
LabelPlacer.XOffsetField = SHP_COL_X
LabelPlacer.YOffsetField = SHP_COL_Y

Layer.Renderer.Add LabelPlacer

Last image for fun

I’m replying myself
finally i replace all the text in a shape by something that I call a GeometryFont
Step One
Convert a text to geometry with the specific font
FormattedText text = new FormattedText(NomduNavire,
CultureInfo.CurrentCulture,
FlowDirection.LeftToRight,
new Typeface(new FontFamily(“Seaport”),
FontStyles.Normal, FontWeights.Bold, FontStretches.Normal),
96,
Brushes.Black);
text.TextAlignment = TextAlignment.Left;
Geometry geometry = text.BuildGeometry(new Point(0, 0));
//// Create a set of polygons by flattening the Geometry object.
PathGeometry pathGeometry = geometry.GetFlattenedPathGeometry(0.001, ToleranceType.Relative);
//var mesure = MeasureString(".");

                Pen pen = new Pen
                {
                    Brush = Brushes.Gray,
                    Thickness = 2
                };
                var bound = pathGeometry.GetRenderBounds(pen);

Step 2
Encapsulates the specific text in the shape at the good scale
with
var rect2 = Rectborder(bound.Height * ech, bound.Width * ech, (k * 10) * ech);
var ok = geoModeleNavire.FillContainsWithDetail(rect2);
var t = Largeur * 0.33;
var s = bound.Height * ech;
if (ok == IntersectionDetail.FullyContains && t >= s)

Step 3 Save in shape file and use it