PointInSectionByAbsolutePoint() public method

public PointInSectionByAbsolutePoint ( PointD absolutePoint ) : PointD
absolutePoint Cairo.PointD
return Cairo.PointD
Ejemplo n.º 1
0
        public override void CreateNewControl(SectionView sectionView)
        {
            var startPoint = sectionView.PointInSectionByAbsolutePoint (designService.StartPressPoint.X, designService.StartPressPoint.Y);

            MonoReports.Model.Controls.Image img = new MonoReports.Model.Controls.Image(){ Location = new MonoReports.Model.Point (startPoint.X, startPoint.Y), Width = 50, Height=50};
            ImageView imageView = sectionView.CreateControlView (img) as ImageView;
            sectionView.Section.Controls.Add (img);
            imageView.ParentSection = sectionView;
            designService.SelectedControl = imageView;
        }
Ejemplo n.º 2
0
        public override void CreateNewControl(SectionView sectionView)
        {
            var startPoint = sectionView.PointInSectionByAbsolutePoint (designService.StartPressPoint.X, designService.StartPressPoint.Y);

            var tb = new TextBlock { Location = new MonoReports.Model.Point (startPoint.X, startPoint.Y), Text="text", FontName="Helvetica", FontSize=11, Size = new Size(70,14) };

            TextBlockView textBlockView = sectionView.CreateControlView (tb) as TextBlockView;

            sectionView.Section.Controls.Add (tb);
            textBlockView.ParentSection = sectionView;
            designService.SelectedControl = textBlockView;
        }
Ejemplo n.º 3
0
        public override void CreateNewControl(SectionView sectionView)
        {
            var startPoint = sectionView.PointInSectionByAbsolutePoint (designService.StartPressPoint.X, designService.StartPressPoint.Y);

            var subreport = new SubReport {
                Location = new MonoReports.Model.Point (startPoint.X, startPoint.Y),
                Size = new Size(50,20),
                BackgroundColor = new MonoReports.Model.Color(0.5,0.5,0.5)
            };
            SubreportView subreportView = sectionView.CreateControlView (subreport) as SubreportView;
            sectionView.Section.Controls.Add (subreport);
            subreportView.ParentSection = sectionView;
            designService.SelectedControl = subreportView;
        }
Ejemplo n.º 4
0
        public override void CreateNewControl(SectionView sectionView)
        {
            var startPoint = sectionView.PointInSectionByAbsolutePoint (designService.StartPressPoint.X, designService.StartPressPoint.Y);

            var l = createLine(startPoint.X,startPoint.Y);
            var lineView = sectionView.CreateControlView (l);
            sectionView.Section.Controls.Add (l);
            lineView.ParentSection = sectionView;
            designService.SelectedControl = lineView;
        }
Ejemplo n.º 5
0
        public override void OnMouseDown()
        {
            currentSection = designService.SelectedControl != null ? designService.SelectedControl.ParentSection : null;
            if (designService.SelectedControl != null) {
                lineDistance = 6 - designService.Zoom;
                line = designService.SelectedControl.ControlModel as Line;
                var location = line.Location;
                var startPoint = currentSection.PointInSectionByAbsolutePoint (designService.StartPressPoint);

                Cairo.PointD startDistance = new Cairo.PointD ( location.X - startPoint.X,  location.Y - startPoint.Y);
                Cairo.PointD endDistance = new Cairo.PointD (line.End.X - startPoint.X,line.End.Y - startPoint.Y);

                if (startDistance.X < lineDistance && startDistance.X > -lineDistance && startDistance.Y < lineDistance && startDistance.Y > -lineDistance) {
                    startPointHit = true;
                } else {
                    if (endDistance.X < lineDistance && endDistance.X > -lineDistance && endDistance.Y < lineDistance && endDistance.Y > -lineDistance)
                        endPointHit = true;
                }
            }
        }
Ejemplo n.º 6
0
 public override ControlViewBase CreateNewControl(SectionView sectionView)
 {
     var startPoint = sectionView.PointInSectionByAbsolutePoint (designService.StartPressPoint.X, designService.StartPressPoint.Y);
     var l = createLine(startPoint.X,startPoint.Y);
     return AddControl(sectionView, l);
 }
Ejemplo n.º 7
0
 public override ControlViewBase CreateNewControl(SectionView sectionView)
 {
     var startPoint = sectionView.PointInSectionByAbsolutePoint (designService.StartPressPoint.X, designService.StartPressPoint.Y);
     MonoReports.Model.Controls.Image img = new MonoReports.Model.Controls.Image(){ Location = new MonoReports.Model.Point (startPoint.X, startPoint.Y), Width = 2.cm(), Height=1.cm()};
     return AddControl(sectionView,img);
 }
Ejemplo n.º 8
0
 public override ControlViewBase CreateNewControl(SectionView sectionView)
 {
     var startPoint = sectionView.PointInSectionByAbsolutePoint (designService.StartPressPoint.X, designService.StartPressPoint.Y);
     var tb = new TextBlock { Location = new MonoReports.Model.Point (startPoint.X, startPoint.Y), Text=Catalog.GetString("text") };
     return AddControl(sectionView, tb);
 }