ImageGear21.Art Assembly > ImageGear.ART Namespace > ImGearARTPage Class > ConvertCoordinates Method : ConvertCoordinates(IImGearScrollableView,ImGearPageDisplay,Graphics,ImGearCoordConvModes,Array) Method |
'Declaration Public Overloads Sub ConvertCoordinates( _ ByVal pageView As IImGearScrollableView, _ ByVal pageDisplay As ImGearPageDisplay, _ ByVal graphics As Graphics, _ ByVal mode As ImGearCoordConvModes, _ ByVal points As Array _ )
'Usage Dim instance As ImGearARTPage Dim pageView As IImGearScrollableView Dim pageDisplay As ImGearPageDisplay Dim graphics As Graphics Dim mode As ImGearCoordConvModes Dim points As Array instance.ConvertCoordinates(pageView, pageDisplay, graphics, mode, points)
public void ConvertCoordinates( IImGearScrollableView pageView, ImGearPageDisplay pageDisplay, Graphics graphics, ImGearCoordConvModes mode, Array points )
public: void ConvertCoordinates( IImGearScrollableView* pageView, ImGearPageDisplay* pageDisplay, Graphics* graphics, ImGearCoordConvModes mode, Array* points )
public: void ConvertCoordinates( IImGearScrollableView^ pageView, ImGearPageDisplay^ pageDisplay, Graphics^ graphics, ImGearCoordConvModes mode, Array^ points )
mode
parameter and taks into account the annotation page orientation.// Create array for use of ConvertCoordinates method. ImGearPoint[] igPoints = new ImGearPoint[1]; // Setup location for the point based on display coordinates, // often received from mouse events. igPoints[0] = new ImGearPoint(100, 100); // Convert point from display coordinates to image coordinates. igARTPage.ConvertCoordinates( igPageView, igPageView.Display, igPageView.CreateGraphics(), ImGearCoordConvModes.DEVICE_TO_IMAGE, igPoints ); // Setup color for the point. ImGearRGBQuad igRGBQuad = new ImGearRGBQuad(0, 255, 0); // Create the point annotation with a width of 10 and 60% opacity ImGearARTPoint igARTPoint = new ImGearARTPoint( igPoints[0], igRGBQuad, 10, (int)(0.60 * 255) ); // Add the annotation to the ARTPage. igARTPage.AddMark(igARTPoint, ImGearARTCoordinatesType.IMAGE_COORD);
'Create array for use of ConvertCoordinates function. Dim igPoints As ImGearPoint() = New ImGearPoint(0) {} ' Setup location for the point based on display coordinates, ' often received from mouse events. igPoints(0) = New ImGearPoint(100, 100) ' Convert point from display coordinates to image coordinates. igARTPage.ConvertCoordinates(igPageView, igPageView.Display, igPageView.CreateGraphics(), _ ImGearCoordConvModes.DEVICE_TO_IMAGE, igPoints) ' Setup color for the point. Dim igRGBQuad As New ImGearRGBQuad(0, 255, 0) ' Create the point annotation with a width of 10 and 60% opacity Dim igARTPoint As New ImGearARTPoint(igPoints(0), igRGBQuad, 10, CInt((0.6 * 255))) ' Add the annotation to the ARTPage. igARTPage.AddMark(igARTPoint, ImGearARTCoordinatesType.IMAGE_COORD)