怎样用中心缩放修改qt 坐标缩放

几何画板怎样缩放纵坐标_百度作业帮
几何画板怎样缩放纵坐标
几何画板怎样缩放纵坐标
用"矩形坐标",再拉动纵轴!
在坐标上(1,0)点拖动,就可以缩放了。
如果是系统自带的坐标系,“绘图”-“网格样式”-“矩形网格”,确定,就会出现y轴的标准点,拖动它就能缩放纵坐标。收藏,1.5k 浏览
问题对人有帮助,内容完整,我也想知道答案
问题没有实际价值,缺少关键内容,没有改进余地
我知道canvas默认是从左顶点开始scale的,我的想法是scale后每个图形势必和左顶点的距离增大了(x-x/scale系数,y-y/scale系数)或者减小了(x+x/scale系数,y+y/scale系数),我就在scale后translate(-(x-x/scale系数),-(y-y/scale系数))或者translate(x+x/scale系数,y+y/scale系数),可是放大时却往右下角偏,缩小时往左上角偏,知道自己translate错了,可又不知道错在哪里,请大家帮忙看看,谢谢了
答案对人有帮助,有参考价值
答案没帮助,是错误的答案,答非所问
6月27日 回答
1:先以原点为基点进行缩放scale(scaleValue,scaleValue),得到缩放后的图。
2:进行translate平移,平移的位置是(x,y)/scaleValue-(x,y)。
同步到新浪微博
分享到微博?
与我们一起探索更多的未知
专业的开发者技术社区,为用户提供多样化的线上知识交流,丰富的线下活动及给力的工作机会
加入只需一步
关闭理由:
删除理由:
忽略理由:
推广(招聘、广告、SEO 等)方面的内容
与已有问题重复(请编辑该提问指向已有相同问题)
答非所问,不符合答题要求
宜作评论而非答案
带有人身攻击、辱骂、仇恨等违反条款的内容
无法获得确切结果的问题
非开发直接相关的问题
非技术提问的讨论型问题
其他原因(请补充说明)
举报理由:
推广(招聘、广告、SEO 等)方面的内容
带有人身攻击、辱骂、仇恨等违反条款的内容
与已有问题重复(请编辑该提问指向已有相同问题)
不友善内容
答非所问,不符合答题要求
其他原因(请补充说明)
补充说明:
扫扫下载 App
SegmentFault
一起探索更多未知帐号:密码:下次自动登录{url:/nForum/slist.json?uid=guest&root=list-section}{url:/nForum/nlist.json?uid=guest&root=list-section}
贴数:1&分页:&发信人: sewawa (sewawa), 信区: VR_3D
标&&题: 3DMax对物体进行缩小处理后物体的中心坐标不在原点上了,怎么才能将物体的中心坐标设回原点?
发信站: BBS 水木清华站 (Tue Jan 25 20:23:21 2005), 站内 && 如题。
-- && ※ 来源:·BBS 水木清华站 ·[FROM: 202.117.91.*]
&文章数:1&分页:
抽奖到手软!将狂欢进行到底!后使用快捷导航没有帐号?
&&活动专区
&&高德地图专区
&&站务管理
只需一步,快速开始
IOS 求助---我如何定位自己后如何设置缩放等级
潜力级地图控
本帖最后由 cheng83492 于
17:34 编辑
我在地图上使用了 self.mapView.showsUserLocation = YES; 地图会自动定位用户当前位置!并且设置当前位置为地图的中心点,和地图的缩放等级!
现在我想修改缩放等级,使视野更大我该如何设置!
再问一下!我用百度取的坐标!该怎么转换才能把正确的打在高德的地图上!
潜力级地图控
cheng83492 发表于
不行啊!我是下面这样调用的!& &
self.mapView.showsUserLocation = YES;
& & MACoordinateSpan span = M ...
如果楼主有解决方案了,一定要告诉我是如何做的呀,我的情况也是,设置region缩放后,缩放的级别越高,中心点就会自动偏右越多
区县级地图控
& & 看一下相关修改缩放范围的介绍
关于百度地图和高德 02 坐标之间的转换, API 中没有提供
潜力级地图控
不行啊!我是下面这样调用的!& &
self.mapView.showsUserLocation = YES;
& & MACoordinateSpan span = MACoordinateSpanMake(0.008 0.008);
& & MACoordinateR
& & region.center = CLLocationCoordinate2DMake(23..145829);
& & region.span =
& & [self.mapView setRegion:region animated:YES];
如果不使用了self.mapView.showsUserLocation = YES; 这样是可以进行缩放等级的!
我是想已当前位置为中心!并且对地图进行缩放的!
潜力级地图控
self.mapView.showsUserLocation = YES;
因为用了它之后会有异步执行调用,所以马上调用& &[self.mapView setRegion:region animated:YES];没用,而是在- (void)mapView:(MAMapView *)mapView regionDidChangeAnimated:(BOOL)animated {
}里面进行缩放!中心点要是当前位置的经纬度!
初级地图控
ikitty 发表于
/ios/guide/map_event& & 看一下相关修改缩放范围的介绍
关于百度地图和高德 02 坐标之 ...
哈哈,应该提供的。这样拉更多百度地图的开发者过来
初级地图控
ikitty 发表于
/ios/guide/map_event& & 看一下相关修改缩放范围的介绍
关于百度地图和高德 02 坐标之 ...
哈哈,应该提供的。这样拉更多百度地图的开发者过来
初级地图控
@interface MAMapView (ZoomLevel)
- (NSUInteger)getZoomL
- (void)setCenterCoordinate:(CLLocationCoordinate2D)centerCoordinate
& && && && && && &zoomLevel:(NSUInteger)zoomLevel
& && && && && && & animated:(BOOL)
- (void)zoomToFitMapA
@end
复制代码
#import &MAMapView+ZoomLevel.h&
#define MERCATOR_OFFSET
#define MERCATOR_RADIUS 05395
@implementation MAMapView (ZoomLevel)
#pragma mark - Map conversion methods
- (double)longitudeToPixelSpaceX:(double)longitude
{
& & return round(MERCATOR_OFFSET + MERCATOR_RADIUS * longitude * M_PI / 180.0);
}
- (double)latitudeToPixelSpaceY:(double)latitude
{
& & return round(MERCATOR_OFFSET - MERCATOR_RADIUS * logf((1 + sinf(latitude * M_PI / 180.0)) / (1 - sinf(latitude * M_PI / 180.0))) / 2.0);
}
- (double)pixelSpaceXToLongitude:(double)pixelX
{
& & return ((round(pixelX) - MERCATOR_OFFSET) / MERCATOR_RADIUS) * 180.0 / M_PI;
}
- (double)pixelSpaceYToLatitude:(double)pixelY
{
& & return (M_PI / 2.0 - 2.0 * atan(exp((round(pixelY) - MERCATOR_OFFSET) / MERCATOR_RADIUS))) * 180.0 / M_PI;
}
#pragma mark - Helper methods
- (MACoordinateSpan)coordinateSpanWithMapView:(MAMapView *)mapView
& && && && && && && && && &&&centerCoordinate:(CLLocationCoordinate2D)centerCoordinate
& && && && && && && && && && && &andZoomLevel:(NSUInteger)zoomLevel
{
& & // convert center coordiate to pixel space
& & double centerPixelX = [self longitudeToPixelSpaceX:centerCoordinate.longitude];
& & double centerPixelY = [self latitudeToPixelSpaceY:centerCoordinate.latitude];
& &
& & // determine the scale value from the zoom level
& & NSInteger zoomExponent = 20 - zoomL
& & double zoomScale = pow(2 zoomExponent);
& &
& & // scale the map’s size in pixel space
& & CGSize mapSizeInPixels = mapView.bounds.
& & double scaledMapWidth = mapSizeInPixels.width * zoomS
& & double scaledMapHeight = mapSizeInPixels.height * zoomS
& &
& & // figure out the position of the top-left pixel
& & double topLeftPixelX = centerPixelX - (scaledMapWidth / 2);
& & double topLeftPixelY = centerPixelY - (scaledMapHeight / 2);
& &
& & // find delta between left and right longitudes
& & CLLocationDegrees minLng = [self pixelSpaceXToLongitude:topLeftPixelX];
& & CLLocationDegrees maxLng = [self pixelSpaceXToLongitude:topLeftPixelX + scaledMapWidth];
& & CLLocationDegrees longitudeDelta = maxLng - minL
& &
& & // find delta between top and bottom latitudes
& & CLLocationDegrees minLat = [self pixelSpaceYToLatitude:topLeftPixelY];
& & CLLocationDegrees maxLat = [self pixelSpaceYToLatitude:topLeftPixelY + scaledMapHeight];
& & CLLocationDegrees latitudeDelta = -1 * (maxLat - minLat);
& &
& & // create and return the lat/lng span
& & MACoordinateSpan span = MACoordinateSpanMake(latitudeDelta longitudeDelta);
& &
}
#pragma mark - Public methods
- (NSUInteger)getZoomLevel
{
& & return 21-round(log2(self.region.span.longitudeDelta * MERCATOR_RADIUS * M_PI / (180.0 * self.bounds.size.width)));
}
- (void)setCenterCoordinate:(CLLocationCoordinate2D)centerCoordinate
& && && && && && &zoomLevel:(NSUInteger)zoomLevel
& && && && && && & animated:(BOOL)animated
{
& & // clamp large numbers to 28
& & zoomLevel = MIN(zoomLevel 28);
& &
& & // use the zoom level to compute the region
& & MACoordinateSpan span = [self coordinateSpanWithMapView:self centerCoordinate:centerCoordinate andZoomLevel:zoomLevel];
& & MACoordinateRegion region = MACoordinateRegionMake(centerCoordinate span);
& &
& & // set the region like normal
& & [self setRegion:region animated:animated];
}
- (void)zoomToFitMapAnnotations
{
& & if ([self.annotations count] == 0)
& &
& & CLLocationCoordinate2D topLeftC
& & topLeftCoord.latitude = -90;
& & topLeftCoord.longitude = 180;
& &
& & CLLocationCoordinate2D bottomRightC
& & bottomRightCoord.latitude = 90;
& & bottomRightCoord.longitude = -180;
& &
& & for(id&MAAnnotation& annotation in self.annotations) {
& && &&&if ([annotation isKindOfClass:[MAUserLocation class]]) {
& && && && &
& && &&&}
& && &&&topLeftCoord.longitude = fmin(topLeftCoord.longitude annotation.coordinate.longitude);
& && &&&topLeftCoord.latitude = fmax(topLeftCoord.latitude annotation.coordinate.latitude);
& && &&&bottomRightCoord.longitude = fmax(bottomRightCoord.longitude annotation.coordinate.longitude);
& && &&&bottomRightCoord.latitude = fmin(bottomRightCoord.latitude annotation.coordinate.latitude);
& & }
& &
& & MACoordinateR
& & region.center.latitude = topLeftCoord.latitude - (topLeftCoord.latitude - bottomRightCoord.latitude) * 0.5;
& & region.center.longitude = topLeftCoord.longitude + (bottomRightCoord.longitude - topLeftCoord.longitude) * 0.5;
& & region.span.latitudeDelta = fabs(topLeftCoord.latitude - bottomRightCoord.latitude) * 1.2;
& & region.span.longitudeDelta = fabs(bottomRightCoord.longitude - topLeftCoord.longitude) * 1.2;
& &
& & region = [self regionThatFits:region];
& & [self setRegion:region animated:YES];
}
@end
复制代码
初级地图控
这是原作者的帖子。上面的代码是我复制过来的,很好用。
小区级地图控
本帖最后由 hw 于
11:50 编辑
我这个是在地图上显示我指定的坐标,并标记出来
#pragma mark - viewDidLoad- (void)viewDidLoad{& & [super viewDidLoad];
& & //创建地图& & [self initMapView];
& & //解析经纬度标记大头针& & [self searchReGeocodeWithCoordinate:_coordinate];}
#pragma mark& &创建地图- (void)initMapView{& & _mapView = [[MAMapView alloc] initWithFrame:self.view.bounds];& & _search&&= [[AMapSearchAPI alloc] initWithSearchKey:kGaoDeKey Delegate:self];
& & _mapView.delegate =& & _search.delegate =& & [self.view addSubview:_mapView];
& & //设置地图默认显示的地区的经纬度& & MACoordinateRegion region = MACoordinateRegionMake(CLLocationCoordinate2DMake(_coordinate.latitude_coordinate.longitude) MACoordinateSpanMake(.025f.025f));& & [_mapView setRegion:region animated:YES];
& & //加入这两行代码,解决地图越拉近,指定的坐标越偏右的问题。& & MAMapRect rect = MAMapRectForCoordinateRegion(region);& & [self.mapView setVisibleMapRect:rect animated:YES];}CAD坐标问题(如何把坐标缩小1000倍)-中国学网-中国IT综合门户网站
> CAD坐标问题(如何把坐标缩小1000倍)
CAD坐标问题(如何把坐标缩小1000倍)
转载 编辑:李强
为了帮助网友解决“CAD坐标问题(如何把坐标缩小1000倍”相关的问题,中国学网通过互联网对“CAD坐标问题(如何把坐标缩小1000倍”相关的解决方案进行了整理,用户详细问题包括:RT,我想知道:CAD坐标问题(如何把坐标缩小1000倍),具体解决方案如下:解决方案1:我是这么认为的!有两处可以调整精度,看你用什么标的。
1.UNITS——精度
2.标注——标注样式——修改——主单位——精度
你的问题只要改第一个就行了。通过对数据库的索引,我们还为您准备了:问:原图是一张规划图,经过修改后,坐标、比例都跟实际1:1比例一样了,可是...答:用天正建筑来标坐标,把单位设成M就可以了 如果你在CAD上标的话,那么把当前标注样式中的主单位中的比例因子改成0.001就可以了===========================================问:用SC,0,0,缩放倍数后坐标变了,请问除此以外的方法,谢谢!答:命令:Sc,基点(0,0),选择参照R,原尺寸1.00,新尺寸0.001,则是缩小1000倍。===========================================问:用SC,0,0,缩放倍数后坐标变了,请问除此以外的方法,谢谢!答:我是这么认为的!有两处可以调整精度,看你用什么标的。 1.UNITS——精度 2.标注——标注样式——修改——主单位——精度 你的问题只要改第一个就行了。===========================================问:用SC,0,0,缩放倍数后坐标变了,请问除此以外的方法,谢谢!答:一原点为基准点,比例因子给0.001===========================================问:用SC,0,0,缩放倍数后坐标变了,请问除此以外的方法,谢谢!答:应该是吧比例因子调到0.001。 格式-标注样式-修改-主单位-比例因子 如果实际测量植为20,比例因子设置为2,那么标注文字将为40。===========================================问:用SC,0,0,缩放倍数后坐标变了,请问除此以外的方法,谢谢!答:视图-显示-UCS图标-特性-图标大小,一般选择12就可以了===========================================问:用SC,0,0,缩放倍数后坐标变了,请问除此以外的方法,谢谢!答:LIMITS是比例因子的快捷键,希望能帮到你===========================================问:图上一点坐标是X=3米 Y=5米 ,另一点是 X=4653...答:缩放-----选择图形-------指定基点------参照-----点改直线的的两端(第一点,第二点)---------新长度-------29.340===========================================我是这么认为的!有两处可以调整精度,看你用什么标的。 1.UNITS--精度 2.标注--标注样式--修改--主单位--精度 你的问题只要改第一个就行了。===========================================有两处可以调整精度,看你用什么标的。 1.UNITS--精度 2.标注--标注样式--修改--主单位--精度 你的问题只要改第一个就行了。===========================================可是还是存在一些的问题: 1.对于简单的直线段这类简单线形,经过缩放后坐标位置不... 坐标点采集为CASS的dat数据文件格式,然后统一将文件中的坐标值统一缩小1000倍,然...=========================================== 命令POINT,回车,在()这个点上点一下,回车,命令SC,指定基点时输入"0,0",回车,再输入缩放比例为0.001,回车,点()会移动到(8.238,1.526)===========================================以m为单位的坐标图?还真没见过。不过m和mm的比值为1000,你可以将整个图形选中,... 我帮你整吧。如果担心泄密资料,可以只发其中的一部分。我觉得没有解决不了的问题。...===========================================你好,那是没有设置好单位的缘故,你输入快捷键zbbz,然后输入s,进入设置页面,把单位设置为M M 就可以了。=========================================== 如果你用鼠标滑轮放大缩小图,坐标是不会改变的,即使你看到XY的坐标标志在变,其实对于世界坐标是不变的。而用命令中的缩放,坐标肯定会变化。 本人愚见,其实CAD中最...===========================================规划局给的两个坐标与电子版结构图纸坐标本身就是一个坐标系的,在电子图纸上没用,放样施工才用得到,在CAD中建立测量上用的坐标系:首先要将电子图比例缩小1000倍(因为...=========================================== 选中要缩放的标注,调整属性里面的你想要的出图比例。===========================================世界坐标系和用户坐标系之间的区别请问:所谓的"同一轴线的X坐标与Y坐标都不相同",请问是图中这样的坐标系吗?如果是这样,需要调整坐标系,也就是把世界坐标系调至用户坐...===========================================
本文欢迎转载,转载请注明:转载自中国学网: []
用户还关注
可能有帮助

我要回帖

更多关于 chart控件 坐标轴缩放 的文章

 

随机推荐